Stock workshop Robotics and Modular Machines:: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 1: Line 1:
Robotics and Modular Machines
'''Robotics and Modular Machines'''
 
Hello Arduino!!!
 
Hello Mr.Stock!!!!
 
[[image:IMG_2885.JPG|400px]]
 
 
==code==
1. programming logic:
 
2. the code.
  a.without musical scale
  b,with musical scale
 
3. c
 
== hardware ==
1. Arduino nano ( volume control. analog inputs,)
 
2. sensors
 
 
 
== learning process==
 
1. AC DC
 
2. H-bridge


learning process


document photos...
document photos...

Revision as of 13:44, 16 March 2013

Robotics and Modular Machines

Hello Arduino!!!

Hello Mr.Stock!!!!

IMG 2885.JPG


code

1. programming logic:

2. the code.

 a.without musical scale
 b,with musical scale

3. c

hardware

1. Arduino nano ( volume control. analog inputs,)

2. sensors


learning process

1. AC DC

2. H-bridge


document photos...

for optical instrument

code:

//no moter //sensor pin const int ldrPin = A1;

//light pin const int ledPin = 13; //speaker pin const int speakerPin = 9;

void setup(){

Serial.begin(115200);
// using those pins as output
pinMode(ledPin, OUTPUT);
pinMode(speakerPin, OUTPUT);

}


void loop() {

 int ldrVal = analogRead(ldrPin);
 //map the value of the light sensor
 ldrVal = map(ldrVal, 170, 600, 0, 1023);
 //constrain the vaule from 0 to 1023
 ldrVal = constrain(ldrVal, 0, 1023);

// turning on the led

 digitalWrite(ledPin, HIGH);
 Serial.println(ldrVal);
 makeTone(ldrVal);

}

void makeTone(int freq){

   digitalWrite(speakerPin, HIGH);
   delayMicroseconds(freq);
   digitalWrite(speakerPin, LOW);
   delayMicroseconds(freq);

}

Hardware:

IMG 2901.JPG

white board :

1. 8533538957_ab70265037_m.jpg 2. 8533538907_fc8fe05d61_m.jpg 3.8534646966_8429d10f3d_m.jpg 4.8534646916_7406c2a305_m.jpg

5. 8533538707_91951352b4_m.jpg 6.8534646722_55a7a6853d_m.jpg 7.8534646606_f236361e0a_m.jpg