I2C Messenger Module

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I2C Messenger Module
#1
Hi Josh, 

I am having 2 issues with the I2C Messenger Module:

1. I can't seem to get bpod to power the module regardless if I use it with/without the jumper and if I power bpod via USB or independent power source or even with both. If I plug a USB into the I2C then I can send messages from bpod to the serial port on the I2C messenger module just fine but if I unplug the usb cable, it won't work. Am I doing something wrong or does this module always need a separate power source from the bpod? 

2. I am trying to send a message from the state machine using the same code you have on your wiki page for the I2CMessenger but it keeps raising an error saying that I need to check the output action. Do I need to define output action 'I2C1' somewhere else? 

Thanks for your help!
Reply
#2
Hi Charlie

The I2C, Valve Driver, SNES and DDS modules can only be powered by a compatible Bpod state machine. Currently, this only includes the pocket state machine prototype, but will include all subsequent state machine hardware, beginning with Bpod State Machine v1.0 to be released this fall. 

How did you get your I2C module? FYI, we recently updated the board design, to include a critical bug fix. When powered by USB, an added diode prevents unnecessary current drain through the 5V regulator of the state machine power interface. I *strongly* recommend updating to the new board if possible. If you purchased the board from our assembly service, we should have sent you an updated board in the mail. Please contact sales if you have not received it.

I2C1 should be a valid action, if the I2C module was detected by the state machine. Click the magnifying glass icon on the Bpod console, to see a list of recognized events and output actions. If the I2C module and its events are not visible, try clicking the "refresh" icon. If your Bpod console does not look like the one pictured, you need to update your software and firmware using the Gen2 repository.

-Josh
Reply
#3
Hi Josh, 

So for some reason bpod is not recognizing the I2C module at all and I have it being powered separately by my computer via USB. I have tried refreshing it as well as using different serial ports but nothing has worked. I am using bpod v0.8 and firmware version 17. 

Also yes, I am using the updated board design. 

Thanks
Reply
#4
Hi Charlie

That's not good!
If Bpod isn't recognizing it or giving you an error message with firmware v17, the module may be defective.
Please contact us at sales@sanworks.io if you purchased from us, and would like a replacement shipped to you.

If you built it, please send a photo (top and bottom) and perhaps we can figure out what went wrong.

Thanks,
-Josh
Reply
#5
Hi I'm trying to get the I2C Messenger Module working. I have it connected to a Bpod 2 by RJ45 and my CPU by USB. Frequently when I try to create the I2C object using I2CMessenger('COM12') I get the error

 "Error using ArComObject/ read (line 286)
Error: The serial port returned 0 bytes.

Error in I2CMessenger (line 42)
      response = obj.Port.read(1,'uint8')"

Moving the USB plug from one jack to another on the CPU will resolve this issue after several iterations, but stability is an issue.

Thanks,
James
Reply
#6
Hi James,

Can you please share a bit more about your configuration?
-OS
-MATLAB version
-Bpod Console Version (see lower-left corner of GUI)

Is PsychToolbox installed?
Is this an I2C module you recently ordered from us?

I'd also check to make sure that your code clears the I2C object before initializing it again.
If you initialized with 
Code:
I2C = I2CMessenger(portString)
you can clear it with
Code:
clear I2C

-Josh
Reply
#7
Hi Josh,


We're using Bpod r2 with console version 1.59 running on a windows 10 system. We are using psychtoolbox and MatLab r2018b. The "Port returned zero bytes" error persists after clearing the Matlab workspace, restarting MatlLab, and restarting the computer. 

Thanks for your help,
Reply
#8
Hi James,


Please contact us at support@sanworks.io to schedule a remote desktop session.

Thanks,
-Josh
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)