How to Build a Raspberry Pi Robot in 10 Days

One of the most popular topics on the Raspberry Pi is to build your own robots. It is in every child’s (and lots of adult)  dream to be able to run and control a robot. The Raspberry Pi computer is light enough to lift and carry it self up on…

Servo Manual Control Without Arduino Servo Library on Raspberry Pi and Gertboard

Arduino Servo library Servo.h despite its simplicity often creates timer conflicts with other PWM pins. In our lab experiment, we found that when we attach servo on Pin 11, PWM capability on at least one of the other pins gets disabled, e.g. the right wheel of the rover attached to Pin 3…

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…

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 »