Arduino vs Gertboard Pin assignment dictionary
Arduino Gertboard Function A0 PC0 Analog A1 PC1 Analog A2 PC2 Analog A3 PC3 Analog A4 PC4 Analog A5 PC5 Analog 0 PD0 RxD 1 PD1 TxD 2 PD2 3 PD3 PWM 4 PD4 5 PD5 PWM 6 PD6 PWM 7 PD7 8 PB0 9…
“Hello World” Running Arduino IDE Serial Monitor on Gertboard
So you have tried the following code and include Serial.println(“Hello World!”); in your sketch yet nothing happens? To see printed messages on the Arduino IDE Serial Monitor, you need to link up the broken-out Raspberry pins as follows: Raspberry Mini UART TXD (GPIO pin 14) -> Gertboard MCRX (1 jumper) Raspberry Mini UART RXD (GPIO pin 15) ->…
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…
HTML script to listen and send commands to Arduino via Serial Port
This is the source code for the web page interface to control your robot. For this to work you need the corresponding NodeJS script behind it. <html> <head> <title>Rasinro – Rasberry Internet Rover</title> </head> <body onmousemove=””> <h1>Rasinro – Raspberry Internet Rover</h1> <p>Status: <span id=”status”>Waiting…</span></p> <table border=’1′> <tr align=”center”><td><button id=’fl’ type=”button”>Forward…
Communicates with Arduino via Website with NodeJS
Install Node JS Install Node Serial Port: https://github.com/voodootikigod/node-serialport Install Coffee Script: npm install -g coffee-script Copy the following coffee script and compile it {SerialPort} = require(‘serialport’) fs = require ‘fs’ port = ‘/dev/ttyACM0’ serial = null value = 0x00 toggle = => value = if value == 0x00 then 0x01…