Rig2: Syringe pump + Arduino

Hi Chris,

I am preparing rig 2 with the Arduino DAQ and syringe pump, both connected via USB ports. It looks like I have to specify the ports (e.g. /dev/…) for each device and wanted to double check with you. Also, do you have a code snippet for the syringe pump?

Thanks,
Yoon

Hi Yoon,

I am preparing rig 2 with the Arduino DAQ and syringe pump, both connected via USB ports. It looks like I have to specify the ports (e.g. /dev/…) for each device and wanted to double check with you.

Yes, that’s correct. If there’s more than one serial device, you have to specify which one you want. As long as you don’t change how the devices are connected (i.e. which port on which USB hub), the device names shouldn’t change, even if you reboot. (Although given the weird issue you and Alina have seen with the Arduino, perhaps that won’t be true.)

Also, do you have a code snippet for the syringe pump?

var reward_volume = 1

iodevice/ne500 ne500 (
    address = '/dev/cu.usbserial-FTH1RRH5'
    log_pump_commands = false
    autostart = true
    ) {
    iochannel/ne500 (
        capability = '00'
        syringe_diameter = 15.0  // mm
        flow_rate = 5
        rate_unit = UM  // uL/min
        variable = reward_volume
        volume_unit = UL  // uL
        )
}

To dispense, assign a value to reward_volume.

Cheers,
Chris

Thank you, Chris!

The pump and Arduino DAQ work well together and their device names are intact after rebooting (although, I still have to wake up Arduino after a reboot but this is really not an issue).

Best,
Yoon