daily pastebin goal
59%
SHARE
TWEET

Untitled

a guest Feb 20th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <SoftwareSerial.h>
  2. #include <AltSoftSerial.h>
  3.  
  4. // AltSoftSerial mySerial;
  5. SoftwareSerial mySerial(10, 11); // RX=D6, TX=D7
  6.  
  7. unsigned int sw_binary_train_1 = 128;
  8. unsigned int sw_binary_train_2 = 127;
  9. unsigned int sw_binary_train_3 = 127;
  10. unsigned int sw_binary_train_4 = 5;
  11. unsigned int sw_binary_train_5 = 127;
  12. unsigned int sw_binary_train_6 = 125;
  13.  
  14. void setup(){
  15.     Serial.begin(9600);
  16.     //Serial1.begin(19200);
  17.     mySerial.begin(9600);
  18. }
  19.  
  20. void loop(){
  21.   mySerial.write(sw_binary_train_1);
  22.   mySerial.write(sw_binary_train_2);
  23.   mySerial.write(sw_binary_train_3);
  24.   mySerial.write(sw_binary_train_4);
  25.   mySerial.write(sw_binary_train_5);
  26.   mySerial.write(sw_binary_train_6);
  27.   delay(43);
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top