BS2 to Arduino Mega serial communications
i trying gps sensor (using parallax bs2) communicate arduino mega 2560. start trying send simple, repetitive signal (eg. "10" or something) using serial (8n1) digital input of arduino, , print out first 16 bits see if can find pattern , isolate stop bit etc... here arduino code:
i can't figure out bits/second bs2 i've included bs code below arduino code. i'm new whole programming word please gentle.
arduino code
basic stamp code
i can't figure out bits/second bs2 i've included bs code below arduino code. i'm new whole programming word please gentle.
arduino code
code: [select]
int bs2receive = 2;
int counter = 0;
void setup() {
serial.begin(9600);
pinmode(bs2receive, input);
}
void loop() {
// 16 times
if (counter < 16) {
// read , print input
int inputstate = digitalread(bs2receive);
serial.print(inputstate);
counter++;
delay(1/19200); // delay in between reads match baud bs2
}
else
{}
}
basic stamp code
code: [select]
' {$stamp bs2}
' {$pbasic 2.0}
result var word
main:
serout 0, 32,[0]
goto main
fyi, "#" code button posting code.
click modify button.
highlight code.
click "#" code button , , create scrolling window code.
click modify button.
highlight code.
click "#" code button , , create scrolling window code.
Arduino Forum > Using Arduino > Microcontrollers > BS2 to Arduino Mega serial communications
arduino
Comments
Post a Comment