úÎD§Al       experimentalerkokl@gmail.com Safe-Inferred3Delay (wait) for the given number of milli-seconds  NB. The  function is broken on Mac, see  /http://hackage.haskell.org/trac/ghc/ticket/7299  Until there'Ds a new GHC release that fixes this issue, we temporarily use system/sleep on Mac. WA simple printer that can keep track of sequence numbers. Used for debugging purposes. !Show a byte in a visible format.  Show a number as a binary value  experimentalerkokl@gmail.com Safe-InferredThe mode for a pin. A pin on the Arduino The pin number CSmart constructor for a pin. The input should be between 1 and 13:  Pins 0-1 are reserved for TX/ RX; so can't be directly used. D 13 pins is UNO specific, we will need to expand this definition if ) we start supporting other boards. 2On the Arduino, pins are grouped into banks of 8. 1 Given a pin, this function determines which port/index it belongs to   experimentalerkokl@gmail.com Safe-Inferred)A response, as returned from the Arduino *Represents messages currently unsupported State of a given port State of a given pin Firmware version (maj/min and indentifier A request, as sent to Arduino 6Write the values of pins on the given port; 2 bytes lo/hi Read the value of a given pin !Set a pin to a particular mode "$Query the Firmata version installed #)Marker for the start of a sys-ex message $'Marker for the end of a sys-ex message %.Wrap a sys-ex message to be sent to the board &APackage a request as a sequence of bytes to be sent to the board  using the Firmata protocol. 'GUnpackage a series of bytes as received from the board into a Response (DParse a response message. TBD: Use a proper (cereal based?) parser. ) Turn a lo/9hi encoded Arduino string constant into a Haskell string  !"#$%&'()*+  !"&' "! #$%&'()*+ experimentalerkokl@gmail.comNoneThe Arduino monad. ,(State of the board and other machinery. -Current debugging routine .Port we are communicating on /8The ID of the board (as identified by the Board itself) 0Communication channel 1,Basic communication channel with the board. 2Receive a sys-ex response. 3'Receive a non-sys-ex response that has n bytes in it 4Send a request down to Arduino 5Retrieve the current channel. 6Send down a request. 7Receive a sys-ex response. 8(Receive a non-sys-ex response, that has n bytes 9$Debugging only: print it on stdout. :,;-./01<23456789:,;-./01<23456789:,;-./01<23456789 experimentalerkokl@gmail.comNoneHRetrieve the Firmata firmware version running on the Arduino. The first I component is the major, second is the minor. The final value is a human / readable identifier for the particular board. :Delay the computaton for a given number of milli-seconds. /Set the mode on a particular pin on the board. )Read the value of a pin in digital mode. 4Set or clear a particular digital pin on the board.     experimentalerkokl@gmail.comNone   experimentalerkokl@gmail.comNone .Run the Haskell program to control the board: @ The file path argument should point to the device file that is " associated with the board. (COM1 on Windows,  '/dev/cu.usbmodemfd131' on Mac, etc.) ; The boolean argument controls verbosity. It should remain  =5 unless you have communication issues. The print-out D is typically less-than-useful, but it might point to the root  cause of the problem. See &System.Hardware.Arduino.Examples.Blink for a simple example.  If >!, debugging info will be printed Path to the USB port &The Haskell controller program to run    experimentalerkokl@gmail.comNone    experimentalerkokl@gmail.comNone=Blink the led connected to port 13 on the Arduino UNO board. E The blinking will synchronize with the printing of a dot on stdout. BDepending on your set-up, you will need to change the path to the B USB board. If you have problems, try changing the first argument  to > in the call to  , which will hopefully print  a useful diagnostic message. ?      !"#$%&'()*+,-./0123456789:;<=>?@ABC6;DEFDEGH hArduino-0.1System.Hardware.Arduino&System.Hardware.Arduino.Examples.BlinkSystem.Hardware.Arduino.UtilsSystem.Hardware.Arduino.Parts System.Hardware.Arduino.ProtocolSystem.Hardware.Arduino.Data&System.Hardware.Arduino.Firmata.BasicsSystem.Hardware.Arduino.FirmataSystem.Hardware.Arduino.CommPinModeSERVOPWMANALOGOUTPUTINPUTpinArduino queryFirmwaredelay setPinMode digitalRead digitalWrite withArduinoblinkbase GHC.Conc.IO threadDelaymkDebugPrintershowByteshowBinPinpinNopinPort $fShowPinResponseUnknownDigitalPortStateDigitalPinStateFirmwareRequestDigitalPortWrite DigitalRead SetPinMode QueryFirmwarecdStartcdEndsysExpackage unpackage getResponse getString$fShowResponse $fShowRequest ArduinoStatemessageport firmataID deviceChannelArduinoChannelrecvChan recvNChansendChan getChannelsendrecvrecvNdebugghc-prim GHC.TypesFalseTrue