Advertisement
Nesnes972

Untitled

Dec 15th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include <Arduino.h>
  2.  
  3. int powerPin = 5;
  4. byte messageA[] = {0xA6, 0x12, 0x02, 0x10, 0x14, 0xCF};
  5. byte messageB[] = {0xA6, 0x12, 0x02, 0x11, 0x14, 0x0B};
  6. byte messageC[] = {0xA6, 0x12, 0x02, 0x15, 0x14, 0x30};
  7.  
  8. void setup() {
  9. // initialize Serial1:
  10. Serial1.begin(9600);
  11.  
  12. pinMode(powerPin, OUTPUT);
  13. digitalWrite(powerPin, HIGH);
  14.  
  15. }
  16.  
  17. void loop() {
  18. delay(500);
  19. Serial1.write(messageC, sizeof(messageC));
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement