wheelsmanx

Arduino(Read-Write)

Mar 29th, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1.  
  2. int incomingByte = 0;
  3.  
  4.  
  5. void setup() {
  6. // put your setup code here, to run once:
  7. Serial.begin(9600);
  8. Serial.println("Ready");
  9. }
  10.  
  11. void loop() {
  12. // put your main code here, to run repeatedly:
  13. if(Serial.available() > 0){
  14. incomingByte = Serial.read();
  15. Serial.print("I received: ");
  16. Serial.println(incomingByte, DEC);
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment