Electronics Firmware - HenriquesLab/NanoJ-Fluidics GitHub Wiki

Installing the firmware

Once all shields are soldered and stacked onto the Arduino, the firmware needs to be installed. To do this:

  1. Install the Arduino IDE
  2. Install the Adafruit Motorshield Library
  3. Download and decompress the firmware
  4. On the .ino file provided in the above download, edit the line const int nShields = 4; to correspond to the number of shields you have installed
  5. Start the Arduino IDE and open .ino file provided in the above download
  6. Upload the firmware using the instructions called "Upload a program" on the Arduino website.

User control

Once the firmware is installed, the controllers are fully installed. They can now be either controlled using the NanoJ-Fluidics Graphical User Interface or they can be controlled directly using serial commands.

For the pumps to inject liquid into a sample, however, you may want to check out our lab-ware section.

Serial control

After establishing a serial connection (baud-rate 57600) to the Arduino controller (using the IDE, for example), it will respond to the below commands accordingly.

  • g = Get status of all pumps
  • a = stop all pumps
  • p = get number of pumps
  • axxy = stop pump xxy
  • sxxynnn = for pump xxy set speed nnn
  • rxxydttttt = start pump xxy in direction d for ttttt seconds

The commands use the notation:

  • d = 1 is forward , d = 2 is backwards
  • xx = shield address {Min : 01 ; Max : 32}
  • y = motor at the pump address {Min : 1 ; Max : 4}
  • nnn = speed {Min : 000; Max : 255}
  • ttttt = duration in seconds {Min : 00001; Max : 99999}