Arduino Driver guide

From SweepMe! Wiki
Revision as of 14:44, 20 February 2018 by Afischer (talk | contribs) (Created page with "Arduino can easily be combined with SweepMe! However, there are some guidelines which make the implementation much easier: # If the Arduino sends a text during its setup() ro...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Arduino can easily be combined with SweepMe! However, there are some guidelines which make the implementation much easier:

  1. If the Arduino sends a text during its setup() routine, SweepMe! knows that sending commands can be done from now on.
  2. The Arduino can send text via its function pringln() which uses a LineFeed character as terminator ("\n"). Thus, the Arduino should also expect to receive messages ending with a LineFeed ("\n"), so that the the write and read terminator are identical.
  3. If the Arduino sends a message back after receiving a command, do send more than one line. Otherwise, one has to read out multiple times in SweepMe! Device Class
  4. Try to make every parameter adjustable by a single command, e.g. "Pixel = 03" or "Voltage = 0.05". That way, multiple items of the sequencer can communicate with the Arduino and multiple parameters can be swept.
  5. Use the standard baudrate of 9600 so that other Arduino Device Classes can easily be copied and modified