Go Down

Topic: solved, bioera software talking to arduino (Read 584 times) previous topic - next topic

neptunier

Dec 01, 2011, 09:16 am Last Edit: Dec 03, 2011, 06:17 pm by neptunier Reason: 1
hello,
i am new to this forum, did some arduino projects but basically i am beginner. i want to connect an arduino to a biofeedback software to control leds. the bioera software uses the serial port for transmitting data, in this case port4. i can not get the arduino and bioera on the same port. this may be a stupid question but is it nesessary to have them at the same port? or how do you manage to read data with arduino?
thanks for your help,
michael

PaulS

#1
Dec 01, 2011, 01:04 pm Last Edit: Dec 01, 2011, 01:11 pm by PaulS Reason: 1
Quote
the bioera software uses the serial port for transmitting data, in this case port4.

Is that not configurable?

Quote
this may be a stupid question but is it nesessary to have them at the same port?

It was (sorry  :)). Yes, both apps need to use the same serial port, if they are to communicate.

Quote
how do you manage to read data with arduino?

Well, first you need to have something send it data. Then, use Serial.available() to see how many bytes there are to read, and use Serial.read() to read the bytes.

I looked at http://www.bioera.net/. I don't see anything there that indicates that the software outputs anything to a serial port.

neptunier

hi paul,
yes, bioera has a serial port element, which is configurable in port numbers. knowing that i was stupid with the question about same port numbers made me think more and i found the problem. i tried to control what came in with the arduino serial monitor, and he refuses to open since the port was used by bioera. so i attached an lcd display and now it connencts. but now i have the second problem ;-(
bioera gives out a and b, this is also what i see in the port monitor. but arduino is just giving out the first space on the lcd as a black spot.
here is the code:


char state=0;
#include <LiquidCrystal.h>
LiquidCrystal lcd(4, 3, 2, 10,11, 12);
void setup() {
   
    Serial.begin(9600);
     lcd.begin(16, 2);
}

void loop() {

  if (Serial.available() > 0)
  {
    lcd.clear();
    state = Serial.read(); // used to read incoming data
    lcd.print(state);
       }
     }
i suppose there is something wrong with the variable.
thanks,
michael

PaulS

Quote
bioera gives out a and b

I don't know what this means.

Quote
i suppose there is something wrong with the variable.

Or your understanding of what the software actually outputs.

neptunier

hi paul,
bioera outputs the letter a, in ascii code 97 i think, when one threshold is passed and the letter b when the threshold is failed. the port monitor receives these letters. but arduino not.
thanks, michael

neptunier

problem solved, it was the baudrate. thanks for help.

Go Up