Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setup() {
- // put your setup code here, to run once:
- Serial.begin(9600);
- }
- void loop() {
- // put your main code here, to run repeatedly:
- if(Serial.available()>0)
- {
- int a = Serial.parseInt();
- int b = Serial.parseInt();
- if(Serial.read() == '\n')
- {
- int c = a + b;
- Serial.println(c);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement