Using Gertboard ATmega as Arduino board

Gertboard is a great IO extension that has the capability of mimicing behaviour of an Arduino board through its ATMega channels. To set it up, you need to: 1. Connect the Gertboard wires as follows: GPIO pin 8 with ISP pin 5 (RESET) GPIO pin 9 with ISP pin 1 (MISO) GPIO…

slide

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…

nodeJS on Raspberry Pi

NodeJS Script to listen and send command to Arduino Robot

var SerialPort,fs, http, io, server, net, serial, port; fs = require(‘fs’); http = require(‘http’); net = require(‘net’); var light1 = true; var light2 = true; SerialPort = require(‘serialport’).SerialPort; port = ‘/dev/ttyACM0’; server = http.createServer(function(req, res) { return fs.readFile(“” + __dirname + “/mobil2an.html”, function(err, data) { res.writeHead(200, { ‘Content-Type’: ‘text/html’ });…

slide

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…

« Previous PageNext Page »