Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extend the output ports
#1
I noticed that the Bpod 0.5 has more pre-defined output ports for LED and water valve, but the Bpod 2 only has four for each. I need 12 digital outputs channels in total, so I am wondering whether I could extend the output channels(LED or valve part) myself by changing somewhere in the code of Matlab software or firmware.  Thanks!
Reply
#2
Hi BinBin,

You have two options:

1. (The hacky way) Use unused pins on Teensy 3.6. You'd set up the pins in the firmware, on lines 161+162 here (see comments on lines 141-145). You'd have to solder wires to each pin + ground.

2. (The cleaner way) You can use a Teensy 3.2 with the Bpod Teensy Shield + this "DIO Module" firmware OR Arduino Zero + the Bpod Arduino Shield + this firmware. Each DIO module you add give you 6 digital outputs and 6 digital inputs. Comments at the top of the firmware file explain its usage.

I hope this helps!

-Josh
Reply
#3
(11-09-2020, 02:23 AM)Josh Wrote: Hi BinBin,

You have two options:

1. (The hacky way) Use unused pins on Teensy 3.6. You'd set up the pins in the firmware, on lines 161+162 here (see comments on lines 141-145). You'd have to solder wires to each pin + ground.

2. (The cleaner way) You can use a Teensy 3.2 with the Bpod Teensy Shield + this "DIO Module" firmware OR Arduino Zero + the Bpod Arduino Shield + this firmware. Each DIO module you add give you 6 digital outputs and 6 digital inputs. Comments at the top of the firmware file explain its usage.

I hope this helps!

-Josh

Hi Josh,

Thanks for the info! That is very helpful!  I tried the hacky way first. For that case, after changing the firmware code in the manual override panel, I didn't see more ports. I probably don't need that for running the protocols, but probably good to have those ports accessible in the GUI for testing and debugging. I am wondering how to modify the software code for having that.
Reply


Forum Jump: