|
#note: some of these are redundant, and
|
|
we will just use the defaults (i.e. pinmode pinNum :output)
|
|
#but for now, will leave them h
|
|
|
|
###basic functions to use
|
|
#these are arduino ones ofc
|
|
#ulisp includes these from arduino:
|
|
#millis, for-millis, with-i2c, restart-i2c, with-serial, with-spi,
|
|
#with-sd-card, pinmode, digitalread, digitalwrite, analogread,
|
|
#analogwrite, delay, note
|
|
#
|
|
#e.g.
|
|
#
|
|
# (pinmode pinNum :output)
|
|
# (digitalwrite pinNum t)
|
|
|
|
#
|
|
# let's ask this: what do I want to accomplish?
|
|
#
|
|
# answer: I want to be able to flash leds from user space. possibly increment a counter, but
|
|
# that's later. for now, just flash leds.
|
|
#
|
|
# solution: build box / board for uno. connect everything up. build initialization program
|
|
# (that will enable outputs as high)
|
|
# Then find a way to send commands from gnulinux. let's begin.
|
|
|
|
|
|
(defun timedhiOut (pinNum howLong)
|
|
(digitalwrite pinNum t)
|
|
(delay howLong)
|
|
(digitalwrite pinNum nil))
|
|
|
|
(defun lowOut (pinNum)
|
|
(digitalwrite pinNum nil))
|
|
|