You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
993 B

3 years ago
  1. #note: some of these are redundant, and
  2. we will just use the defaults (i.e. pinmode pinNum :output)
  3. #but for now, will leave them h
  4. ###basic functions to use
  5. #these are arduino ones ofc
  6. #ulisp includes these from arduino:
  7. #millis, for-millis, with-i2c, restart-i2c, with-serial, with-spi,
  8. #with-sd-card, pinmode, digitalread, digitalwrite, analogread,
  9. #analogwrite, delay, note
  10. #
  11. #e.g.
  12. #
  13. # (pinmode pinNum :output)
  14. # (digitalwrite pinNum t)
  15. #
  16. # let's ask this: what do I want to accomplish?
  17. #
  18. # answer: I want to be able to flash leds from user space. possibly increment a counter, but
  19. # that's later. for now, just flash leds.
  20. #
  21. # solution: build box / board for uno. connect everything up. build initialization program
  22. # (that will enable outputs as high)
  23. # Then find a way to send commands from gnulinux. let's begin.
  24. (defun timedhiOut (pinNum howLong)
  25. (digitalwrite pinNum t)
  26. (delay howLong)
  27. (digitalwrite pinNum nil))
  28. (defun lowOut (pinNum)
  29. (digitalwrite pinNum nil))