UPDATED Arduino Sketch for Robot Car that listens to NodeJS serial commands
#include <pitches.h> #include <MemoryFree.h> #include <Servo.h> #define sensePin A2 //right sensor #define trigRight 0 #define echoRight 1 //center sensor #define trigCenter 2 #define echoCenter 10 //left sensor #define trigLeft A4 #define echoLeft A5 #define melodyPin 8 //put the buzzer into pin 2 #define melodyPin2 12 //put the buzzer into pin…