Thursday, April 18, 2013
Build up of wireless on Arduino
Tutorial to connect motors and xbee shield to Arduino
http://www.jayconsystems.com/tutorial/xbee_Shield/
http://tutorial.cytron.com.my/2013/03/29/arduino-edubot/
http://letsmakerobots.com/node/36345?page=1
Saturday, April 6, 2013
Programming the Atmel /ATtiny using Arduino
Found this on Make-mag link
programming ATtiny using Arduino board
http://hlt.media.mit.edu/?p=1706
Another Atmel
http://bytesandlogics.wordpress.com/category/arduino/
programming ATtiny using Arduino board
http://hlt.media.mit.edu/?p=1706
Another Atmel
http://bytesandlogics.wordpress.com/category/arduino/
Tuesday, February 19, 2013
Monday, September 17, 2012
New link
iRobot create
http://08milluz.wordpress.com/2012/02/21/irobot-create-arduino-shield/
8x8 RGB LED dot matrix display - common Anode
http://www.betlux.com/product/led_dot_matrix/BL-M19A881xxx.PDF
shift register
http://www.instructables.com/id/The-74HC164-Shift-Register-and-your-Arduino/
http://08milluz.wordpress.com/2012/02/21/irobot-create-arduino-shield/
8x8 RGB LED dot matrix display - common Anode
http://www.betlux.com/product/led_dot_matrix/BL-M19A881xxx.PDF
shift register
http://www.instructables.com/id/The-74HC164-Shift-Register-and-your-Arduino/
Friday, September 14, 2012
Monday, July 16, 2012
Working with SAM-3
Here's the routine to pass cmd at repeatedly to the SAM-3.
/*
SAM motor player
This sketch shows how to use the serial transmit pin (pin 1) to send SAM motor data.
*/
char inByte = 0; // incoming serial byte
char firstSensor = 0; // first analog sensor
char secondSensor = 0; // second analog sensor
char i =0;
void setup() {
// Set MIDI baud rate:
Serial.begin(115200);
}
void loop() {
if (i >= 200) i = 0;
CmdOn(0x00, 0x20+i);
delay(100);
CmdOn(0x1E, 0x20+i);
i=i+20;
Serial.print("i=");
Serial.println(i,DEC);
delay(100);
if (Serial.available() > 0) {
// get incoming byte:
inByte = Serial.read();
// read first analog input:
firstSensor = analogRead(A0);
// read second analog input:
secondSensor = analogRead(A1);
// send sensor values:
Serial.print(0xFF & firstSensor);
Serial.print(",");
Serial.println(0xFF & secondSensor);
delay(500);
}
}
void CmdOn(int data1, int data2) {
Serial.write(0xFF);
Serial.write(data1);
Serial.write(data2);
Serial.write((data1^data2)&0x7F); //compute checksum on the fly
}
/*
SAM motor player
This sketch shows how to use the serial transmit pin (pin 1) to send SAM motor data.
*/
char inByte = 0; // incoming serial byte
char firstSensor = 0; // first analog sensor
char secondSensor = 0; // second analog sensor
char i =0;
void setup() {
// Set MIDI baud rate:
Serial.begin(115200);
}
void loop() {
if (i >= 200) i = 0;
CmdOn(0x00, 0x20+i);
delay(100);
CmdOn(0x1E, 0x20+i);
i=i+20;
Serial.print("i=");
Serial.println(i,DEC);
delay(100);
if (Serial.available() > 0) {
// get incoming byte:
inByte = Serial.read();
// read first analog input:
firstSensor = analogRead(A0);
// read second analog input:
secondSensor = analogRead(A1);
// send sensor values:
Serial.print(0xFF & firstSensor);
Serial.print(",");
Serial.println(0xFF & secondSensor);
delay(500);
}
}
void CmdOn(int data1, int data2) {
Serial.write(0xFF);
Serial.write(data1);
Serial.write(data2);
Serial.write((data1^data2)&0x7F); //compute checksum on the fly
}
Sunday, July 15, 2012
Using Arduino Firmata with Processing
Attempted to use the Standard Firmata on the Arduino Uno R2 to control 2 servos on pin 9 & 10 however it didsn't work. It was replaced by the Analog Firmata and only the following Processing program worked.
import processing.serial.*;
import cc.arduino.*;
Arduino arduino;
int servoPinX = 10;
int servoPinY = 9;
int sensorPin = 0;
float sensorValue = 0;
int posX=0, posY=0; //servo position in degrees (0..180)
void setup()
{
size(360, 360);
arduino = new Arduino(this, Arduino.list()[1], 57600); //your offset may vary
arduino.pinMode(servoPinX,4);
arduino.pinMode(servoPinY,4);
arduino.pinMode(sensorPin,0);
}
void draw()
{
sensorValue = arduino.analogRead(0);
println(sensorValue);
// read mouseX coordinate
int newPosX = constrain(mouseX/2,40,140); // update bg & servo position if mouseX changed
// read mouseY coordinate
int newPosY = constrain(mouseY/2,40,140); // update bg & servo position if mouseX changed
if(newPosX != posX ||newPosY != posY)
{
background(newPosX);
arduino.analogWrite(servoPinX, newPosX);
arduino.analogWrite(servoPinY, newPosY);
println (" newPos = " + newPosX );
posX=newPosX; //update servo position storage variable
posY=newPosY; //update servo position storage variable
}
}
import processing.serial.*;
import cc.arduino.*;
Arduino arduino;
int servoPinX = 10;
int servoPinY = 9;
int sensorPin = 0;
float sensorValue = 0;
int posX=0, posY=0; //servo position in degrees (0..180)
void setup()
{
size(360, 360);
arduino = new Arduino(this, Arduino.list()[1], 57600); //your offset may vary
arduino.pinMode(servoPinX,4);
arduino.pinMode(servoPinY,4);
arduino.pinMode(sensorPin,0);
}
void draw()
{
sensorValue = arduino.analogRead(0);
println(sensorValue);
// read mouseX coordinate
int newPosX = constrain(mouseX/2,40,140); // update bg & servo position if mouseX changed
// read mouseY coordinate
int newPosY = constrain(mouseY/2,40,140); // update bg & servo position if mouseX changed
if(newPosX != posX ||newPosY != posY)
{
background(newPosX);
arduino.analogWrite(servoPinX, newPosX);
arduino.analogWrite(servoPinY, newPosY);
println (" newPos = " + newPosX );
posX=newPosX; //update servo position storage variable
posY=newPosY; //update servo position storage variable
}
}
Subscribe to:
Posts (Atom)