Forums

Welcome, Guest
You have to register before you can post on our site.

Search Forums

(Advanced Search)

Forum Statistics
» Members: 27
» Latest member: jerrko14567
» Forum threads: 223
» Forum posts: 795

Full Statistics

Online Users
There are currently 9 online users.
» 0 Member(s) | 9 Guest(s)

Latest Threads
Display visual stimulus i...
Forum: Software
Last Post: trose_neuro
02-20-2020, 10:13 AM
» Replies: 2
» Views: 57
if statement
Forum: Software
Last Post: Ilja
02-19-2020, 09:57 PM
» Replies: 3
» Views: 67
Increasing max number of ...
Forum: Software
Last Post: Josh
02-19-2020, 04:11 PM
» Replies: 1
» Views: 34
Fusion PCB Ordering Proce...
Forum: Hardware
Last Post: Max
02-19-2020, 11:45 AM
» Replies: 4
» Views: 130
Consecutive triggering of...
Forum: Software
Last Post: Josh
02-18-2020, 08:03 PM
» Replies: 1
» Views: 34
DC Barrel Jack PCB cutout
Forum: Hardware
Last Post: Josh
02-18-2020, 07:59 PM
» Replies: 1
» Views: 39
System Reboot
Forum: Software
Last Post: Josh
02-18-2020, 07:47 PM
» Replies: 1
» Views: 30
Calibrate valvemodules
Forum: Software
Last Post: Josh
02-16-2020, 02:30 AM
» Replies: 1
» Views: 34
Continuous Pulse train wi...
Forum: Software
Last Post: Josh
02-13-2020, 03:44 AM
» Replies: 3
» Views: 72
acknowledgement byte afte...
Forum: Software
Last Post: JoanaNeto
02-11-2020, 07:26 PM
» Replies: 0
» Views: 27

 
  Bpod modules and Bpod r0.5
Posted by: Jeff - 11-14-2019, 05:10 PM - Forum: Hardware - Replies (1)

Hi Josh: I have a bunch of r0.5 Bpods. Is there any kludgy way to use them with the Valve Driver and Rotary Encoder modules?


  oLED failure
Posted by: njm - 11-07-2019, 07:32 PM - Forum: Hardware - Replies (1)

Hi,

The oLED on our Pulse pal has stopped working and doesn't display anything when the pulse pal is plugged in. We haven't used it in a while and nothing has happened to it that would explain it stopping working. The arduino seems to still be drawing power. 

Any advice on how to troubleshoot and fix this problem would be most appreciated.

Thanks,
Niall


Thumbs Up setSontinuous python function not working
Posted by: Lucas - 10-28-2019, 08:37 PM - Forum: Software - Replies (1)

I have a file with the basic sin wave from the example and then setContinuous function after with the proper channel in it. It runs once and that is it. Is there anything else i need to add into my code to have it run forever?? 

Can post code later.

Thank you,
Lucas


  Flashing LED with Waveform
Posted by: tanner.stevenson - 10-17-2019, 08:16 PM - Forum: Software - Replies (4)

I was wondering what is the recommended way to flash an LED with a waveform, similar to the way I can play a sound using the PsychToolbox? If the Analog Output Module is recommended, is it possible to accomplish the task with just the Bpod itself?


  Running Bpod in parallel to another Matlab process
Posted by: morana08 - 10-15-2019, 09:25 AM - Forum: Software - Replies (3)

Dear Josh,

I'm interested in purchasing the Bpod system for our new behavioural set, however, I wanted to make sure it can work smoothly with our current software.
We do electro-physiological recordings, and our system combines Matlab for experimental protocols and TDT for stimulation.
We planned to trigger the state machine through a BNC input from the TDT machine.

My question is, will it be possible to run both Bpod and our own protocol on Matlab?
I understood the TrialManager function allows for releasing the program between trials, but I'm not sure how to implement it.

Let me know which further details you need to answer me Smile

Many thanks in advance,
Moran


  ArCOM error when uploading to Arduino
Posted by: millenialfalcon - 10-12-2019, 11:02 PM - Forum: Software - Replies (2)

Hi, Josh and other Bpod users.

I would like to integrate some hardware I have wired up using an arduino to my Bpod state machine.
I took the example code from the Github (Bpod_Gen2-master\Examples\Firmware\Bpod Shield\DIO) and tried uploading it to my arduino uno. However, I obtain a "prototype for '`' does not match any class in 'ArCOM' " error. I have attached the full error message below. How can I address this error?

I have seen a similar error previously when there was a header file class and .cpp file discrepancy, but I'm a little lost on how to proceed. Any feedback would be appreciated!


Code:
Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "Arduino/Genuino Uno"

ArCOM.cpp:42:6: error: prototype for 'void ArCOM::writeUint16(short unsigned int)' does not match any in class 'ArCOM'

void ArCOM::writeUint16(unsigned short int2Write) {

     ^

In file included from sketch\ArCOM.cpp:22:0:

ArCOM.h:44:8: error: candidate is: void ArCOM::writeUint16(uint16_t)

  void writeUint16(uint16_t int2Write);

       ^

ArCOM.cpp:65:16: error: prototype for 'short unsigned int ArCOM::readUint16()' does not match any in class 'ArCOM'

unsigned short ArCOM::readUint16() {

               ^

In file included from sketch\ArCOM.cpp:22:0:

ArCOM.h:54:12: error: candidate is: uint16_t ArCOM::readUint16()

  uint16_t readUint16();

           ^

DIO:29:18: error: 'Serial1' was not declared in this scope

ArCOM Serial1COM(Serial1); // Wrap Serial1 (UART on Arduino M0, Due + Teensy 3.X)

                 ^

ArCOM.cpp:188:6: error: prototype for 'void ArCOM::readInt16Array(short int*, unsigned int)' does not match any in class 'ArCOM'

void ArCOM::readInt16Array(short numArray[], unsigned int nValues) {

     ^

In file included from sketch\ArCOM.cpp:22:0:

ArCOM.h:69:8: error: candidate is: void ArCOM::readInt16Array(int16_t*, unsigned int)

  void readInt16Array(int16_t numArray[], unsigned int size);

       ^

DIO:60:3: error: 'Serial1' does not name a type

  Serial1.begin(1312500);

  ^

exit status 1
prototype for 'void ArCOM::writeUint16(short unsigned int)' does not match any in class 'ArCOM'


  Control external serial device
Posted by: mikeeconomo - 10-11-2019, 02:13 PM - Forum: Hardware - Replies (1)

I'd like to control an external serial device using a bpod r2.  It seems that within the Matlab API, one can forward serial commands to the Module outputs.  If I understand correctly, SM->Module communication occurs at a baud rate hard-coded in the bpod firmware (1.3 Mb/s). The device I'd like to control uses a different baud rate (115200).  Is there a way to set the SM->Module baud rate through the API?  Or is it better to modify the firmware?  If I do the latter, will that disrupt communication with existing modules (e.g. the analog output module)?  Or can I control the baud rate for each Module output separately?  Perhaps there is a better way to control an external serial device than by using the module outputs?


  Sync camera with Bpod
Posted by: Meowater - 10-08-2019, 09:23 PM - Forum: Software - Replies (1)

Hi Josh and other Bpod users,

I am trying to sync video acquisition with behavioral tasks using Bpod throughout each trial. The camera I am using can capture frames triggered by individual TTL pulses. The following is my questions: 

1.      What is the best way to trigger the camera and have synced timestamps between the camera and the Bpod? 

           a. use Bpod TTL output channel to send pulses to trigger the camera.       
           b. use Analog Output Module to send a waveform.      
           c. use an external device to send TTL pulses to both the Bpod and the camera. The external device would be  triggered by the onset and offset of each trial. 

2.    If one were to use either the Bpod TTL output channel or the Analog Output module, is it possible to send a continuous TTL pulses within each trial that is dependent on the start and the end of the trial? I could be wrong, but my concern of triggering the camera through each state is that the short delay between states might cause jitters in the frame rate, especially when the frame rate is high. 

Thanks!

Best,
Miao


  Waveform size of 8ch output module
Posted by: Meowater - 10-07-2019, 03:59 PM - Forum: Software - Replies (2)

Hi, 

I am using the 8 channel analog module with Bpod State Machine R2 to control optical stimulation. 
According to the description for Waveplayer, the maximum sample size is 1M. 

However, with the current setup, I get the following error when the waveform size is set to be anything bigger (>) than 499997: 




Quote:Error using serial/fwrite (line 199)
Unsuccessful write: The number of bytes written must be less than or equal to OutputBufferSize-BytesToOutput.

Error in ArCOMObject_Bpod/write (line 293)
                    fwrite(obj.Port, ByteString, 'uint8');

Error in BpodWavePlayer/loadWaveform (line 329)
            obj.Port.write(['L' WaveIndex-1], 'uint8', nSamples, 'uint32', WaveBits, 'uint16');

Error in Airpuff_v4 (line 104)
W.loadWaveform(3, Pulse20Hz');

Error in run (line 91)
evalin('caller', strcat(script, ';'));

Error in NewLaunchManager>LaunchProtocol (line 707)
run(ProtocolPath);
 
Error while evaluating DestroyedObject Callback.


Only Ch1 and Ch2 of the output Module are currently in use, and the sampling rate is around 44k. 

The protocol runs as long as the sample size of those waveforms are set to be less than (<=) 499997. 


Do you know what could be causing this issue with the waveform size and how to increase it to reach 1M? Thanks!

Best,
Miao


  Air puff
Posted by: Bowey - 10-07-2019, 12:38 AM - Forum: Hardware - Replies (2)

Hi Josh,

I wonder if there's a way to deliver air puff via the solenoid valve controlled by Bpod? If so, what will be the parameter fit for this purpose?

Best,
Bowen