Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UART to UART #13

Open
PandaTheOne opened this issue Jul 28, 2017 · 0 comments
Open

UART to UART #13

PandaTheOne opened this issue Jul 28, 2017 · 0 comments

Comments

@PandaTheOne
Copy link

PandaTheOne commented Jul 28, 2017

hey guys!

First, sorry for my bad English.
I'm really new in the micro:bit world. I try to experiment UART.
I have two micro:bit. And I connect them.

my code are :
` #include "MicroBit.h"

MicroBit uBit;
MicroBitSerial serial(MICROBIT_PIN_P1, MICROBIT_PIN_P2);

int main()
{
uBit.init();
uBit.serial.baud(115200);
int c;
c=1;
while (1)
{
uBit.serial.send(int(c));
uBit.sleep(100);
}
}
`

and

` #include "MicroBit.h"

MicroBit uBit;
MicroBitSerial serial(MICROBIT_PIN_P2, MICROBIT_PIN_P1);

int main()
{
uBit.init();
uBit.serial.baud(115200);
int c;
while(1)
{
c=uBit.serial.read(ASYNC);
if(c==1)
{
uBit.display.print("A");
uBit.sleep(100);
}

}
} `

So I just want to write "A" on one micro:bit by sending 1 from the other. but It doesn't work haha
If you have any idea, please help me!

Thank's a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant