Re: Arduino
Добавлено: 10 мар 2018, 04:06
Помимо традиционного C для Arduino ...
ArduinoML implementation in Scheme
Lisp for the Arduino and MSP430
ArduinoML implementation in Scheme
Код: Выделить всё
(define-application Example_with_two_leds
:sensors
((button 9))
:actuators
((led1 11)
(led2 12))
:states
((on (set! led1 "HIGH") (set! led2 "LOW"))
(off (set! led1 "LOW") (set! led2 "HIGH")))
:transitions
((on -> off when button "HIGH")
(off -> on when button "HIGH"))
:initial
off)
Код: Выделить всё
(defun blink ()
(pinmode 13 t)
(loop
(digitalwrite 13 t)
(delay 1000)
(digitalwrite 13 nil)
(delay 1000)
)
)