Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <SoftwareSerial.h>
- int RX = 3;
- int TX = 2;
- SoftwareSerial BT(RX, TX);
- long VAL = 0 ;
- void setup() {
- Serial.begin(9600); // put your setup code here, to run once:
- BT.begin(9600);
- }
- void loop() {
- // put your main code here, to run repeatedly:
- if (BT.available()); {
- VAL = BT.parseInt();
- if (VAL > 0) {
- Serial.println(VAL);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement