<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7307277335928934782</id><updated>2024-08-31T19:20:50.486+03:00</updated><category term="Arduino Duemilanove soft magazin"/><category term="LCD Serial"/><category term="control"/><category term="senzor lumina"/><category term="5v"/><category term="7digits display"/><category term="L293D descriere motoare DC"/><category term="LED"/><category term="SHARP"/><category term="arduino program L293D"/><category term="arduino senzor IR telecomanda display"/><category term="cod"/><category term="fotorezistenta"/><category term="releu"/><category term="robot ir remote arduino"/><category term="robot lcd cd srf05 servo arduino shield"/><category term="senzor de distanta"/><category term="senzor temperatura"/><title type='text'>Electronica/Programare C++</title><subtitle type='html'>Am creat acest blog pentru a face publice cunostintele mele in domeniul electronicii si a programarii (C++) cu scopul de a ajuta pe altii sau sa invat ceva nou. Majoritatea proiectelor vor fi facute folosind Arduino Duemilanove.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://electronicasiprogramare.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://electronicasiprogramare.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Cristi</name><uri>http://www.blogger.com/profile/00112816687340960322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7307277335928934782.post-978925369157400711</id><published>2011-09-25T19:40:00.000+03:00</published><updated>2011-09-25T19:40:10.272+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="robot lcd cd srf05 servo arduino shield"/><title type='text'>CD Bot</title><content type='html'>Astazi am gasit timp sa termin robotelul pe care l-am facut &quot;printre picaturi&quot;. Este un robot care ocoleste obstacolele, iar in drumetia pe care o parcurge afiseaza pe un LCD intensitatea luminii. Are 2 LED-uri unul galben si unul RGB, cel galben licareste cand detecteaza un obstacol iar cel RGB isi schimba culoarea in functie de activitatea curenta a robotului.&lt;br /&gt;
     Din titlu cred ca banuiti din ce este construit robotul, anume din cd-uri, forma sa estetica nu este cea finala; mie imi pare destul de dragut si imi place sa il privesc in actiune, doar e creatia mea. Actual nu are prea multe intrebuintari si multi probabil ar socoti acest robot nefolositor, momentan este distractiv si acesta e scopul lui, sa amuze intr-o mica masura.&lt;br /&gt;
     In urmatoarele upgrade-uri robotul va cauta cele mai luminoase locuri, va afisa temeratura pe LCD, o sa ii atasez si un difuzor sa fie mai comic, va mai primi in dotare un receptor si un emitator IR, si in functie de forma estetica poate si un brat robotizat.&lt;br /&gt;
&lt;br /&gt;
    Mai jos afisez codu-l robotului dupa cum am obisnuit, dar din cauza ca nu stiu cum sa il pun altfel cum intalniti pe alte sitte-uri si din cauza ca ocupa foarte mult spatiu, acesta este ultimul cod afisat(cele scurte vor face exceptie), pentru viitoarele cod-uri trebuie doar sa imi lasati un comentariu cu adresa de e-mail iar eu voi trimite codu-l sursa in cel mai scurt timp.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
COD:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
 *  Robt obsticle evasion prgoram Version 2.3&lt;br /&gt;
 *  By Musat Cristian&lt;br /&gt;
 *  19/2/2010&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
  #include &lt;Servo.h&gt;    // Servo library&lt;br /&gt;
  &lt;br /&gt;
  int dir = 1;          // declare variables&lt;br /&gt;
  int pos = 0;&lt;br /&gt;
  int pingPin = 8;&lt;br /&gt;
  int pwm_a = 3;  //PWM control for motor outputs 1 and 2 is on digital pin 3&lt;br /&gt;
  int pwm_b = 11;  //PWM control for motor outputs 3 and 4 is on digital pin 11&lt;br /&gt;
  int dir_a = 12;  //direction control for motor outputs 1 and 2 is on digital pin 12&lt;br /&gt;
  int dir_b = 13;  //direction control for motor outputs 3 and 4 is on digital pin 13&lt;br /&gt;
  Servo headservo;&lt;br /&gt;
  &lt;br /&gt;
  void setup()&lt;br /&gt;
{&lt;br /&gt;
  pinMode(pwm_a, OUTPUT);  //Set control pins to be outputs&lt;br /&gt;
  pinMode(pwm_b, OUTPUT);&lt;br /&gt;
  pinMode(dir_a, OUTPUT);&lt;br /&gt;
  pinMode(dir_b, OUTPUT);&lt;br /&gt;
  &lt;br /&gt;
  pinMode(4,     OUTPUT);&lt;br /&gt;
  pinMode(5,     OUTPUT);&lt;br /&gt;
  pinMode(6,     OUTPUT);&lt;br /&gt;
  pinMode(2,     OUTPUT);&lt;br /&gt;
  pinMode(9,     OUTPUT);&lt;br /&gt;
  pinMode(10,     OUTPUT);&lt;br /&gt;
  digitalWrite(2, LOW);&lt;br /&gt;
  digitalWrite(9, LOW);&lt;br /&gt;
  headservo.attach(7);&lt;br /&gt;
  &lt;br /&gt;
  Serial.begin(9600);    // attach LCD to com port&lt;br /&gt;
  &lt;br /&gt;
  wait(1);               // stop the robot&lt;br /&gt;
 &lt;br /&gt;
  ledWrite(LOW,HIGH,HIGH);   // Flash LED&lt;br /&gt;
  delay(500);&lt;br /&gt;
  ledWrite(HIGH,LOW,HIGH);&lt;br /&gt;
  delay(500);&lt;br /&gt;
  ledWrite(HIGH,HIGH,LOW);&lt;br /&gt;
  delay(500);&lt;br /&gt;
}&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  void loop (void) {           // Main body of the program&lt;br /&gt;
      &lt;br /&gt;
    int inches;&lt;br /&gt;
      &lt;br /&gt;
    while(inches&gt;8)           // while nothing is within 10 inches do the following&lt;br /&gt;
    {&lt;br /&gt;
      if (pos == 0) &lt;br /&gt;
    {&lt;br /&gt;
      dir = 3;                 // if it is looking left direction is positive&lt;br /&gt;
      headservo.write(pos);    // tell servo to go to position in variable &#39;pos&#39;&lt;br /&gt;
      delay(3); &lt;br /&gt;
    }&lt;br /&gt;
      &lt;br /&gt;
      else if (pos == 180) &lt;br /&gt;
    {&lt;br /&gt;
      dir = -3;                // if it is looking right direction is negative&lt;br /&gt;
      headservo.write(pos);    // tell servo to go to position in variable &#39;pos&#39;&lt;br /&gt;
      delay(3);                // waits 3ms for the servo to reach the position&lt;br /&gt;
    }&lt;br /&gt;
     headservo.write(pos);&lt;br /&gt;
      inches = ping ();        // anybody there?    &lt;br /&gt;
      pos += dir;              // recalculate position variable&lt;br /&gt;
      forward(1);              // Move forward&lt;br /&gt;
 &lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    int x = headservo.read();&lt;br /&gt;
    wait(0);                    // stop the robot&lt;br /&gt;
    &lt;br /&gt;
    if(inches&gt;5)                // for objects further away turn gradually&lt;br /&gt;
    {&lt;br /&gt;
     if (x&gt;=0 &amp;&amp; x&lt;90)
    {
      digitalWrite(pwm_a, 80);  //set both motors to run at (100/255 = 39)% duty cycle (slow)
      digitalWrite(pwm_b, 230);
      delay(50);
       
    }
    
    if (x&gt;=90 &amp;&amp; x&lt;=180)
    {
      digitalWrite(pwm_a, 230);  //set both motors to run at (100/255 = 39)% duty cycle (slow)
      digitalWrite(pwm_b, 80);
      delay(50); 
       
    }
  //   if (x&gt;=75 &amp;&amp; x&lt;105)
  //  {
  //    backward(100);
  //    right(50);
  //  }
    }
    else                            // for close objects turn hard
    {
      
      if (x&gt;=0 &amp;&amp; x&lt;90)
    {
      right(100);
      
    }
    
    if (x&gt;=90 &amp;&amp; x&lt;=180)
    {
      left(100);
      
    }
   // if (x&gt;=75 &amp;&amp; x&lt;105)&lt;br /&gt;
   // {&lt;br /&gt;
  //    backward(100);&lt;br /&gt;
 //     left(50);&lt;br /&gt;
  //  }&lt;br /&gt;
    &lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    blinck();&lt;br /&gt;
  }&lt;br /&gt;
    &lt;br /&gt;
    // This function sends a signal to the Ping semsor and reterns a value in inches&lt;br /&gt;
    &lt;br /&gt;
    int ping ()   &lt;br /&gt;
    {&lt;br /&gt;
      pinMode(pingPin, OUTPUT);&lt;br /&gt;
      digitalWrite(pingPin, LOW);           // make sure the signal pin starts low&lt;br /&gt;
      delayMicroseconds(2);&lt;br /&gt;
      digitalWrite(pingPin, HIGH);          // hello, ping)))&lt;br /&gt;
      delayMicroseconds(5);&lt;br /&gt;
      digitalWrite(pingPin, LOW);&lt;br /&gt;
      pinMode(pingPin, INPUT);&lt;br /&gt;
      return pulseIn(pingPin, HIGH) / 148;  // wait for echo and return inches&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    // Movement functions&lt;br /&gt;
    &lt;br /&gt;
    void forward(int fsec)&lt;br /&gt;
   {&lt;br /&gt;
      &lt;br /&gt;
      Serial.print(&quot;forward&quot;);&lt;br /&gt;
      digitalWrite(pwm_a, 240);  //set both motors to run at (100/255 = 39)% duty cycle (slow)&lt;br /&gt;
      digitalWrite(pwm_b, 240);   // display direction&lt;br /&gt;
      digitalWrite(dir_a, LOW);  //Set motor direction, 1 low, 2 high&lt;br /&gt;
      digitalWrite(dir_b, LOW);  //Set motor direction, 3 high, 4 low&lt;br /&gt;
      ledWrite(LOW,LOW,LOW);      // set LED colour&lt;br /&gt;
&lt;br /&gt;
      delay(fsec);               // delay period defined in function call&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   void left(int lsec)&lt;br /&gt;
   {&lt;br /&gt;
      &lt;br /&gt;
      Serial.print(&quot;left&quot;);&lt;br /&gt;
      digitalWrite(pwm_a, 240);  //set both motors to run at (100/255 = 39)% duty cycle (slow)&lt;br /&gt;
      digitalWrite(pwm_b, 240);    &lt;br /&gt;
      digitalWrite(dir_a, LOW);  //Set motor direction, 1 low, 2 high&lt;br /&gt;
      digitalWrite(dir_b, HIGH);  //Set motor direction, 3 high, 4 low&lt;br /&gt;
      ledWrite(HIGH,LOW,HIGH);&lt;br /&gt;
      &lt;br /&gt;
      delay(lsec); &lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   void right(int rsec)&lt;br /&gt;
   {&lt;br /&gt;
      &lt;br /&gt;
      Serial.print(&quot;right&quot;);&lt;br /&gt;
      digitalWrite(pwm_a, 240);  //set both motors to run at (100/255 = 39)% duty cycle (slow)&lt;br /&gt;
      digitalWrite(pwm_b, 240);&lt;br /&gt;
      digitalWrite(dir_a, HIGH);  //Set motor direction, 1 low, 2 high&lt;br /&gt;
      digitalWrite(dir_b, LOW);  //Set motor direction, 3 high, 4 low&lt;br /&gt;
      ledWrite(HIGH,HIGH,LOW);&lt;br /&gt;
     &lt;br /&gt;
      delay(rsec); &lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   void backward(int bsec)&lt;br /&gt;
   {&lt;br /&gt;
      &lt;br /&gt;
      Serial.print(&quot;backward&quot;);&lt;br /&gt;
      digitalWrite(pwm_a, 0);  //set both motors to run at (100/255 = 39)% duty cycle (slow)&lt;br /&gt;
      digitalWrite(pwm_b, 0);&lt;br /&gt;
      digitalWrite(dir_a, HIGH);  //Set motor direction, 1 low, 2 high&lt;br /&gt;
      digitalWrite(dir_b, HIGH);  //Set motor direction, 3 high, 4 low&lt;br /&gt;
      ledWrite(LOW,LOW,HIGH);&lt;br /&gt;
&lt;br /&gt;
      delay(bsec);   &lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   void wait(int wsec)&lt;br /&gt;
   {&lt;br /&gt;
     &lt;br /&gt;
     Serial.print(&quot;stop&quot;);&lt;br /&gt;
     digitalWrite(pwm_a, 0);  //set both motors to run at (100/255 = 39)% duty cycle (slow)&lt;br /&gt;
     digitalWrite(pwm_b, 0);&lt;br /&gt;
     digitalWrite(dir_a, LOW);  //Set motor direction, 1 low, 2 high&lt;br /&gt;
     digitalWrite(dir_b, LOW);  //Set motor direction, 3 high, 4 low&lt;br /&gt;
     ledWrite(LOW,HIGH,HIGH);&lt;br /&gt;
&lt;br /&gt;
     delay(wsec);    &lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   // LED write function&lt;br /&gt;
   &lt;br /&gt;
   void ledWrite(boolean r, boolean g, boolean b)&lt;br /&gt;
   {&lt;br /&gt;
     digitalWrite(4, r);  &lt;br /&gt;
     digitalWrite(6, g);  &lt;br /&gt;
     digitalWrite(5, b);&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   void blinck()&lt;br /&gt;
   {&lt;br /&gt;
     digitalWrite(10, HIGH);&lt;br /&gt;
   delay(40);&lt;br /&gt;
   digitalWrite(10, LOW);&lt;br /&gt;
   delay(140);&lt;br /&gt;
   }</content><link rel='replies' type='application/atom+xml' href='http://electronicasiprogramare.blogspot.com/feeds/978925369157400711/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://electronicasiprogramare.blogspot.com/2011/09/cd-bot.html#comment-form' title='3 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/978925369157400711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/978925369157400711'/><link rel='alternate' type='text/html' href='http://electronicasiprogramare.blogspot.com/2011/09/cd-bot.html' title='CD Bot'/><author><name>Cristi</name><uri>http://www.blogger.com/profile/00112816687340960322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7307277335928934782.post-8157908299839871227</id><published>2011-02-04T14:05:00.001+02:00</published><updated>2011-02-04T20:32:36.574+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="robot ir remote arduino"/><title type='text'>C1RM controlat cu o telecomanda IR</title><content type='html'>Dupa ce am imbinat unele programe folosite in post-urile anterioare si dupa ce am &quot;rezolvat&quot; bug-urile care au aparut din cauza incompatibilitatii librariilor, am reusit sa controlez robotul cu o telecomanda prin IR.&lt;br /&gt;
Telecomanda IR nu este la fel de precisa ca o telecomanda RC dar iti poti face treaba cu ea.&lt;br /&gt;
&lt;br /&gt;
Am folosit 7 butoane de pe telecomanda, dintre care 2 butoane actioneaza un LED iar 5 butoane actioneaza motoarele robotului.&lt;br /&gt;
&lt;br /&gt;
Am folosit:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;IR reciver (TSOP48)&lt;/li&gt;
&lt;li&gt;telecomanda IR&lt;/li&gt;
&lt;li&gt;LCD Serial&lt;/li&gt;
&lt;li&gt;2 x motoare DC&lt;/li&gt;
&lt;li&gt;Arduino Duemilanove&lt;/li&gt;
&lt;li&gt;LED&lt;/li&gt;
&lt;li&gt;L293D (punte H &amp;nbsp;pentru motoare)&lt;/li&gt;
&lt;/ul&gt;Pe LCD sunt afisate operatiunile pe care le executa robotul.&lt;br /&gt;
&lt;br /&gt;
Program:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;#include &lt;irremote.h&gt;&lt;/irremote.h&gt;&lt;br /&gt;
&amp;nbsp;#include &lt;newsoftserial.h&gt;&lt;/newsoftserial.h&gt;&lt;br /&gt;
&amp;nbsp;#define rxPin 9 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;#define txPin 10&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;int RECV_PIN = 12;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;IRrecv irrecv(RECV_PIN);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;decode_results results;&lt;br /&gt;
NewSoftSerial serial = &amp;nbsp;NewSoftSerial(rxPin, txPin);&lt;br /&gt;
&lt;br /&gt;
const int motor1a = 2;&lt;br /&gt;
const int motor2a = 4;&lt;br /&gt;
const int motor1b = 5;&lt;br /&gt;
const int motor2b = 7;&lt;br /&gt;
const int enable1 = 3;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
const int ledPin = 13;&lt;br /&gt;
boolean val = HIGH;&lt;br /&gt;
int led = 8;&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
pinMode(rxPin, INPUT); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
pinMode(txPin, OUTPUT);&lt;br /&gt;
pinMode(motor1a, OUTPUT);&lt;br /&gt;
pinMode(motor2a, OUTPUT);&lt;br /&gt;
pinMode(motor1b, OUTPUT);&lt;br /&gt;
pinMode(motor2b, OUTPUT);&lt;br /&gt;
pinMode(ledPin, OUTPUT);&lt;br /&gt;
pinMode(led, OUTPUT);&lt;br /&gt;
digitalWrite(enable1, HIGH);&lt;br /&gt;
&lt;br /&gt;
serial.begin(9600);&lt;br /&gt;
&amp;nbsp;irrecv.enableIRIn();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// clipeste ledPin de 3 ori. Asta trebuie sa se intample doar 1 data.&lt;br /&gt;
// daca vezi ca ledul clipeste de mai multe ori inseamna ca s-a&lt;br /&gt;
// resetat; probabil din cauza ca motorasele sunt arse&lt;br /&gt;
// sau este un scurt circuit.&lt;br /&gt;
blink(ledPin, 3, 100);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void Reverse()&lt;br /&gt;
{&lt;br /&gt;
digitalWrite(enable1, HIGH);&lt;br /&gt;
digitalWrite(motor1a, HIGH);&lt;br /&gt;
digitalWrite(motor2a, LOW);&lt;br /&gt;
digitalWrite(motor1b, HIGH);&lt;br /&gt;
digitalWrite(motor2b, LOW);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void Forward()&lt;br /&gt;
{&lt;br /&gt;
digitalWrite(enable1, HIGH);&lt;br /&gt;
digitalWrite(motor1a, LOW);&lt;br /&gt;
digitalWrite(motor2a, HIGH);&lt;br /&gt;
digitalWrite(motor1b, LOW);&lt;br /&gt;
digitalWrite(motor2b, HIGH);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void Left()&lt;br /&gt;
{&lt;br /&gt;
digitalWrite(enable1, HIGH);&lt;br /&gt;
digitalWrite(motor1a, LOW);&lt;br /&gt;
digitalWrite(motor2a, HIGH);&lt;br /&gt;
digitalWrite(motor1b, HIGH);&lt;br /&gt;
digitalWrite(motor2b, LOW);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void Right()&lt;br /&gt;
{&lt;br /&gt;
digitalWrite(enable1, HIGH);&lt;br /&gt;
digitalWrite(motor1a, HIGH);&lt;br /&gt;
digitalWrite(motor2a, LOW);&lt;br /&gt;
digitalWrite(motor1b, LOW);&lt;br /&gt;
digitalWrite(motor2b, HIGH);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void Stop()&lt;br /&gt;
{&lt;br /&gt;
digitalWrite(enable1, LOW);&lt;br /&gt;
digitalWrite(motor1a, LOW);&lt;br /&gt;
digitalWrite(motor2a, LOW);&lt;br /&gt;
digitalWrite(motor1b, LOW);&lt;br /&gt;
digitalWrite(motor2b, LOW);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void blink(int whatPin, int howManyTimes, int milliSecs)&lt;br /&gt;
{&lt;br /&gt;
int i = 0;&lt;br /&gt;
for(i=0; i&amp;lt;=3; i++)&lt;br /&gt;
&amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; digitalWrite(ledPin, HIGH);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; delay(100/2);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; digitalWrite(ledPin, LOW);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; delay(100/2);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
serial.print(&quot;$CLEAR\n\r&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
serial.print(&quot;$GO 1 1\n\r&quot;);&lt;br /&gt;
serial.print(&quot;$PRINT Strat asteapta \n\r&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
serial.print(&quot;\n\r&quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void rectsop()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;if (irrecv.decode(&amp;amp;results))&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;irrecv.resume();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;rectsop();&lt;br /&gt;
if(results.value==16718055) &amp;nbsp;//scrie 2&lt;br /&gt;
&amp;nbsp;{&lt;br /&gt;
&amp;nbsp;Forward();&lt;br /&gt;
&amp;nbsp;serial.print(&quot;$CLEAR\n\r&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;serial.print(&quot;$GO 1 1\n\r&quot;);&lt;br /&gt;
&amp;nbsp;serial.print(&quot;$PRINT Inainte (2) \n\r&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;serial.print(&quot;\n\r&quot;);&lt;br /&gt;
&amp;nbsp;delay(100);&lt;br /&gt;
&amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
if(results.value==16726215) &amp;nbsp; // scrie 5&lt;br /&gt;
&amp;nbsp;{&lt;br /&gt;
&amp;nbsp;Stop();&lt;br /&gt;
&amp;nbsp;serial.print(&quot;$CLEAR\n\r&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;serial.print(&quot;$GO 1 1\n\r&quot;);&lt;br /&gt;
&amp;nbsp;serial.print(&quot;$PRINT Stop (5) \n\r&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;serial.print(&quot;\n\r&quot;);&lt;br /&gt;
&amp;nbsp;delay(100);&lt;br /&gt;
&amp;nbsp;}&lt;br /&gt;
if(results.value==16734885) &amp;nbsp;//scrie 6&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;Right();&lt;br /&gt;
&amp;nbsp;serial.print(&quot;$CLEAR\n\r&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;serial.print(&quot;$GO 1 1\n\r&quot;);&lt;br /&gt;
&amp;nbsp;serial.print(&quot;$PRINT Dreapta (6) \n\r&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;serial.print(&quot;\n\r&quot;);&lt;br /&gt;
&amp;nbsp;delay(100);&lt;br /&gt;
&amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
if(results.value==16716015) &amp;nbsp; // scrie 4&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;Left();&lt;br /&gt;
&amp;nbsp;serial.print(&quot;$CLEAR\n\r&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;serial.print(&quot;$GO 1 1\n\r&quot;);&lt;br /&gt;
&amp;nbsp;serial.print(&quot;$PRINT Stanga (4) \n\r&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;serial.print(&quot;\n\r&quot;);&lt;br /&gt;
&amp;nbsp;delay(100);&lt;br /&gt;
&amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
if(results.value==16730805) &amp;nbsp;// scrie 8&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;Reverse();&lt;br /&gt;
&amp;nbsp;serial.print(&quot;$CLEAR\n\r&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;serial.print(&quot;$GO 1 1\n\r&quot;);&lt;br /&gt;
&amp;nbsp;serial.print(&quot;$PRINT Inapoi (8) \n\r&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;serial.print(&quot;\n\r&quot;);&lt;br /&gt;
&amp;nbsp;delay(100);&lt;br /&gt;
&amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
if(results.value==16750695) //scrie+100&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;digitalWrite(led, HIGH);&lt;br /&gt;
&amp;nbsp;serial.print(&quot;$CLEAR\n\r&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;serial.print(&quot;$GO 1 1\n\r&quot;);&lt;br /&gt;
&amp;nbsp;serial.print(&quot;$PRINT Aprinde LED \n\r&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;serial.print(&quot;\n\r&quot;);&lt;br /&gt;
&amp;nbsp;delay(100);&lt;br /&gt;
&amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
if(results.value==16754775)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;digitalWrite(led, LOW);&lt;br /&gt;
&amp;nbsp;serial.print(&quot;$CLEAR\n\r&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;serial.print(&quot;$GO 1 1\n\r&quot;);&lt;br /&gt;
&amp;nbsp;serial.print(&quot;$PRINT Stinge LED \n\r&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;serial.print(&quot;\n\r&quot;);&lt;br /&gt;
&amp;nbsp;delay(100);&lt;br /&gt;
&amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/veTrKNLmO4s?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
*In locul librariei SoftwareSerial.h care intra in conflict cu IRremote.h am folosit NewSoftSerial.h</content><link rel='replies' type='application/atom+xml' href='http://electronicasiprogramare.blogspot.com/feeds/8157908299839871227/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://electronicasiprogramare.blogspot.com/2011/02/c1rm-controlat-cu-o-telecomanda-ir.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/8157908299839871227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/8157908299839871227'/><link rel='alternate' type='text/html' href='http://electronicasiprogramare.blogspot.com/2011/02/c1rm-controlat-cu-o-telecomanda-ir.html' title='C1RM controlat cu o telecomanda IR'/><author><name>Cristi</name><uri>http://www.blogger.com/profile/00112816687340960322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7307277335928934782.post-1111029837048530667</id><published>2011-02-04T13:44:00.000+02:00</published><updated>2011-02-04T13:44:26.683+02:00</updated><title type='text'>Roboti</title><content type='html'>Ce este un robot?&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Verdana, Helvetica, sans-serif;&quot;&gt;Este un sistem automatizat care acționează pe baza unui program (COD) de lucru stabilit sau care reacționează la anumite influențe exterioare (senzori).&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Verdana, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Verdana, Helvetica, sans-serif;&quot;&gt;Din ce este format?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Verdana, Helvetica, sans-serif;&quot;&gt;Robotul este format din :&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Verdana, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Verdana, Helvetica, sans-serif;&quot;&gt;&lt;ul&gt;&lt;li&gt;3 parti:&lt;/li&gt;
&lt;/ul&gt;&lt;ol&gt;&lt;li&gt;mecanica&lt;/li&gt;
&lt;li&gt;electronica&lt;/li&gt;
&lt;li&gt;programare&lt;/li&gt;
&lt;/ol&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Verdana, Helvetica, sans-serif;&quot;&gt;&lt;ul&gt;&lt;li&gt;2 parti:&lt;/li&gt;
&lt;/ul&gt;&lt;ol&gt;&lt;li&gt;mecanica&lt;/li&gt;
&lt;li&gt;electronica&lt;/li&gt;
&lt;/ol&gt;Robotii se impart in mai multe categorii, roboti industriali, roboti cu roti, roboti cu picioare, etc.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Verdana, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Verdana, Helvetica, sans-serif;&quot;&gt;Pe mine m-au atras robotii cu roti sau senile, si de aceea am inceput sa lucrez la un robot cu roti care sa se deplaseze singur, sa se fereasca de obstacole si sa adune date pe care sa le trimita pe un telefon mobil.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Verdana, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Verdana, Helvetica, sans-serif;&quot;&gt;Momentan datele vor fi afisate pe un LCD Serial 16x2, pana mai strang bani sa cumpar modulele de care mai am nevoie.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Verdana, Helvetica, sans-serif;&quot;&gt;Robotul meu este construit pe platforma Arduino Duemilanove, pe care peste ceva timp intentionez sa o schimb cu o platforma Arduino Mega sau Seeeduino Mega.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Verdana, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Verdana, Helvetica, sans-serif;&quot;&gt;Datele pe care le strange robotul sunt: temperatura, umiditatea, calitatea aerului (gaz, CO2), intensitatea luminii.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Verdana, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Verdana, Helvetica, sans-serif;&quot;&gt;Pentru detectarea obstacolelor folosesc un senzor &amp;nbsp;Ping))) (SRF05) si 3 senzori SHARP(1 x GP2D120, &amp;nbsp; 2 x&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;GP2Y0D805Z0F)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Mai multe detalii o sa dau in post-urile viitoare pe care le voi scrie in timp ce fac progrese cu robotul a carui denumire este C1RM.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Verdana, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://electronicasiprogramare.blogspot.com/feeds/1111029837048530667/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://electronicasiprogramare.blogspot.com/2011/02/roboti.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/1111029837048530667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/1111029837048530667'/><link rel='alternate' type='text/html' href='http://electronicasiprogramare.blogspot.com/2011/02/roboti.html' title='Roboti'/><author><name>Cristi</name><uri>http://www.blogger.com/profile/00112816687340960322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7307277335928934782.post-5631253068886823522</id><published>2011-02-03T13:40:00.000+02:00</published><updated>2011-02-03T13:40:29.521+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="arduino senzor IR telecomanda display"/><title type='text'>Arduino controlat cu o telecomanda</title><content type='html'>Arduino este o placuta open source, asta insemnand ca poate fi folosit la aproape orice. Astazi am vrut sa vad cum functioneaza combinatia dintre:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Arduino&lt;/li&gt;
&lt;li&gt;display cu 7 segmente&lt;/li&gt;
&lt;li&gt;receptor IR TSOP48&lt;/li&gt;
&lt;li&gt;telecomanda&lt;/li&gt;
&lt;/ul&gt;Am facut un montaj cu Arduino si TSOP48 am deschis &quot;Serial Monitor&quot; din programul arduino, apoi am apasat pe diferite butoane de la telecomanda pentru a afla codul numeric pentru fiecare buton; pentru asta am folosit urmatorul COD:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#include &lt;irremote.h&gt;&lt;/irremote.h&gt;&lt;br /&gt;
&lt;br /&gt;
int RECV_PIN = 12;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;IRrecv irrecv(RECV_PIN);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;decode_results results;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void setup() { &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Serial.begin(9600);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;irrecv.enableIRIn();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; if (irrecv.decode(&amp;amp;results))&lt;br /&gt;
&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Serial.println(results.value, DEC);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;irrecv.resume(); // Receive the next value&lt;br /&gt;
&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
dupa ce am aflat ce &amp;nbsp;cod numeric are fiecare buton, am folosit un display cu 7 segmente pe care sa imi apara ce buton am apasat pe telecomanda.&lt;br /&gt;
(nu am folosit toate butoanele in urmatorul montaj ci butoanele de la 0 la 9, care afiseaza pe display numerele de la 0 la 9 si inca 3 butoane, unul care afiseaza punctul pe display, altul care stinge punctul si inca un buton care stinge tot display-ul)&lt;br /&gt;
&lt;br /&gt;
Pentru asta am folosit urmatorul COD:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#include &lt;irremote.h&gt;&lt;/irremote.h&gt;&lt;br /&gt;
&lt;br /&gt;
int RECV_PIN = 12;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;IRrecv irrecv(RECV_PIN);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;decode_results results;&lt;br /&gt;
&lt;br /&gt;
void setup() { &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;pinMode(2, OUTPUT);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;pinMode(3, OUTPUT);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;pinMode(4, OUTPUT);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;pinMode(5, OUTPUT);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;pinMode(6, OUTPUT);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;pinMode(7, OUTPUT);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;pinMode(8, OUTPUT);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;pinMode(9, OUTPUT);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Serial.begin(9600);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;irrecv.enableIRIn();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; if (irrecv.decode(&amp;amp;results))&lt;br /&gt;
&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Serial.println(results.value, DEC);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;irrecv.resume(); // Receive the next value&lt;br /&gt;
&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
if(results.value==16724175) &amp;nbsp;//scrie 1&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;digitalWrite(2, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(3, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(4, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(5, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(6, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(7, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(8, 0);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;if(results.value==16718055) &amp;nbsp;//scrie 2&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;digitalWrite(2, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(3, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(4, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(5, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(6, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(7, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(8, 1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;if(results.value==16743045) &amp;nbsp; //scrie 3&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;digitalWrite(2, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(3, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(4, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(5, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(6, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(7, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(8, 1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;if(results.value==16716015) &amp;nbsp; // scrie 4&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;digitalWrite(2, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(3, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(4, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(5, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(6, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(7, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(8, 1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;if(results.value==16726215) &amp;nbsp; // scrie 5&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;digitalWrite(2, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(3, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(4, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(5, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(6, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(7, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(8, 1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;if(results.value==16734885) &amp;nbsp;//scrie 6&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;digitalWrite(2, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(3, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(4, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(5, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(6, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(7, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(8, 1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;if(results.value==16728765) // scrie 7&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;digitalWrite(2, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(3, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(4, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(5, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(6, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(7, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(8, 0);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;if(results.value==16730805) &amp;nbsp;// scrie 8&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;digitalWrite(2, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(3, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(4, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(5, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(6, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(7, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(8, 1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;if(results.value==16732845) &amp;nbsp;// scrie 9&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;digitalWrite(2, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(3, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(4, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(5, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(6, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(7, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(8, 1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;if(results.value==16738455) &amp;nbsp; // scrie 0&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;digitalWrite(2, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(3, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(4, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(5, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(6, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(7, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(8, 0);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if(results.value==16756815) &amp;nbsp; // sterge display&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;digitalWrite(2, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(3, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(4, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(5, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(6, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(7, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(8, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(9, 0);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if(results.value==16750695) &amp;nbsp; // scrie punct&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;digitalWrite(9, 1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if(results.value==16748655) &amp;nbsp; // sterge punct&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;digitalWrite(9, 0);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/t-hvuRCLL80?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Dupa cum vedeti, in acest montaj sunt combinate 2 COD-uri(programe) cel de la display-ul cu 7 segmente si cel de la receporul infrarosu.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://electronicasiprogramare.blogspot.com/feeds/5631253068886823522/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://electronicasiprogramare.blogspot.com/2011/02/arduino-controlat-cu-o-telecomanda.html#comment-form' title='3 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/5631253068886823522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/5631253068886823522'/><link rel='alternate' type='text/html' href='http://electronicasiprogramare.blogspot.com/2011/02/arduino-controlat-cu-o-telecomanda.html' title='Arduino controlat cu o telecomanda'/><author><name>Cristi</name><uri>http://www.blogger.com/profile/00112816687340960322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7307277335928934782.post-6701721467113262852</id><published>2011-01-23T23:48:00.001+02:00</published><updated>2011-02-03T13:12:50.677+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="7digits display"/><category scheme="http://www.blogger.com/atom/ns#" term="Arduino Duemilanove soft magazin"/><category scheme="http://www.blogger.com/atom/ns#" term="control"/><title type='text'>Arduino si 7-segment display</title><content type='html'>&amp;nbsp;&amp;nbsp; Pentru a afisa pe un display cu 7 segmente trebuie mai intai sa identificati pinii display-ului de la 1 la 10.&lt;br /&gt;
In tabel se gasesc pinii din arduino care corespund fiecarui pin din display. pinii 3 si 8 sunt GND si de aceea nu apar in tabel. &amp;nbsp;Mai jos aveti imagini informative despre display.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; border=&quot;1&quot; cellpadding=&quot;2&quot; height=&quot;253&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; color: #333333; font-family: Helvetica, Arial, sans-serif; font-size: 12px; line-height: 15px; width: 231px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td align=&quot;center&quot;&gt;&lt;strong&gt;Arduino Pin&lt;/strong&gt;&lt;/td&gt;&lt;td align=&quot;center&quot;&gt;&lt;strong&gt;7 Segment Pin Connection&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;center&quot;&gt;&amp;nbsp;2&lt;/td&gt;&lt;td align=&quot;center&quot;&gt;7 (A)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;center&quot;&gt;&amp;nbsp;3&lt;/td&gt;&lt;td align=&quot;center&quot;&gt;6 (B)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;center&quot;&gt;&amp;nbsp;4&lt;/td&gt;&lt;td align=&quot;center&quot;&gt;4 (C)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;center&quot;&gt;&amp;nbsp;5&lt;/td&gt;&lt;td align=&quot;center&quot;&gt;2 (D)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;center&quot;&gt;&amp;nbsp;6&lt;/td&gt;&lt;td align=&quot;center&quot;&gt;1 (E)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;center&quot;&gt;&amp;nbsp;7&lt;/td&gt;&lt;td align=&quot;center&quot;&gt;9 (F)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;center&quot;&gt;&amp;nbsp;8&amp;nbsp;&lt;/td&gt;&lt;td align=&quot;center&quot;&gt;&amp;nbsp;10 (G)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;center&quot;&gt;&amp;nbsp;9&amp;nbsp;&lt;/td&gt;&lt;td align=&quot;center&quot;&gt;5 (DP)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.hacktronics.com/images/stories/led-diagram-3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.hacktronics.com/images/stories/led-diagram-3.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
COD:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.hacktronics.com/images/stories/seven_segment_led_pins.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;160&quot; src=&quot;http://www.hacktronics.com/images/stories/seven_segment_led_pins.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;void setup() { &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;pinMode(2, OUTPUT); &lt;br /&gt;
&amp;nbsp;&amp;nbsp;pinMode(3, OUTPUT);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;pinMode(4, OUTPUT);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;pinMode(5, OUTPUT);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;pinMode(6, OUTPUT);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;pinMode(7, OUTPUT);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;pinMode(8, OUTPUT);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;pinMode(9, OUTPUT);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;digitalWrite(9, 1); &amp;nbsp;// aprinde punct&lt;br /&gt;
&amp;nbsp;&amp;nbsp;delay(100);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
&lt;a href=&quot;http://www.hacktronics.com/images/stories/7seg-2.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.hacktronics.com/images/stories/7seg-2.gif&quot; /&gt;&lt;/a&gt;//punct&lt;br /&gt;
digitalWrite(9, 0);&lt;br /&gt;
delay(500);&lt;br /&gt;
&lt;br /&gt;
// write &#39;9&#39;&lt;br /&gt;
&amp;nbsp;digitalWrite(2, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(3, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(4, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(5, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(6, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(7, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(8, 1);&lt;br /&gt;
&amp;nbsp;delay(10000);&lt;br /&gt;
&amp;nbsp;// write &#39;8&#39;&lt;br /&gt;
&amp;nbsp;digitalWrite(2, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(3, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(4, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(5, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(6, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(7, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(8, 1);&lt;br /&gt;
&amp;nbsp;delay(10000);&lt;br /&gt;
&amp;nbsp;// write &#39;7&#39;&lt;br /&gt;
&amp;nbsp;digitalWrite(2, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(3, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(4, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(5, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(6, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(7, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(8, 0);&lt;br /&gt;
&amp;nbsp;delay(10000);&lt;br /&gt;
&amp;nbsp;// write &#39;6&#39;&lt;br /&gt;
&amp;nbsp;digitalWrite(2, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(3, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(4, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(5, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(6, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(7, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(8, 1);&lt;br /&gt;
&amp;nbsp;delay(10000);&lt;br /&gt;
&amp;nbsp;// write &#39;5&#39;&lt;br /&gt;
&amp;nbsp;digitalWrite(2, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(3, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(4, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(5, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(6, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(7, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(8, 1);&lt;br /&gt;
&amp;nbsp;delay(10000);&lt;br /&gt;
&amp;nbsp;// write &#39;4&#39;&lt;br /&gt;
&amp;nbsp;digitalWrite(2, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(3, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(4, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(5, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(6, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(7, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(8, 1);&lt;br /&gt;
&amp;nbsp;delay(10000);&lt;br /&gt;
&amp;nbsp;// write &#39;3&#39;&lt;br /&gt;
&amp;nbsp;digitalWrite(2, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(3, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(4, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(5, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(6, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(7, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(8, 1);&lt;br /&gt;
&amp;nbsp;delay(10000);&lt;br /&gt;
&amp;nbsp;// write &#39;2&#39;&lt;br /&gt;
&amp;nbsp;digitalWrite(2, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(3, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(4, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(5, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(6, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(7, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(8, 1);&lt;br /&gt;
&amp;nbsp;delay(10000);&lt;br /&gt;
&amp;nbsp;// write &#39;1&#39;&lt;br /&gt;
&amp;nbsp;digitalWrite(2, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(3, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(4, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(5, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(6, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(7, 0);&lt;br /&gt;
&amp;nbsp;digitalWrite(8, 0);&lt;br /&gt;
&amp;nbsp;delay(10000);&lt;br /&gt;
&amp;nbsp;// write &#39;0&#39;&lt;br /&gt;
&amp;nbsp;digitalWrite(2, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(3, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(4, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(5, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(6, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(7, 1);&lt;br /&gt;
&amp;nbsp;digitalWrite(8, 0);&lt;br /&gt;
&amp;nbsp;delay(4000);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Aceasta varianta este foarte usor de inteles, dar avem mult de muncit la cod. Asa ca voi prezenta si o varianta mai compacta de cod, cu acelasi rezultat.&lt;br /&gt;
&lt;br /&gt;
COD:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #333399;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333399;&quot;&gt;/&lt;/span&gt;/ 1 = LED on, 0 = LED off&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Arduino pin: 2,3,4,5,6,7,8&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;byte seven_seg_digits[10][7] = { { 1,1,1,1,1,1,0 }, &amp;nbsp;// = 0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { 0,1,1,0,0,0,0 }, &amp;nbsp;// = 1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { 1,1,0,1,1,0,1 }, &amp;nbsp;// = 2&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { 1,1,1,1,0,0,1 }, &amp;nbsp;// = 3&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { 0,1,1,0,0,1,1 }, &amp;nbsp;// = 4&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { 1,0,1,1,0,1,1 }, &amp;nbsp;// = 5&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { 1,0,1,1,1,1,1 }, &amp;nbsp;// = 6&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { 1,1,1,0,0,0,0 }, &amp;nbsp;// = 7&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { 1,1,1,1,1,1,1 }, &amp;nbsp;// = 8&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { 1,1,1,0,0,1,1 } &amp;nbsp; // = 9&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;void setup() { &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp;pinMode(2, OUTPUT); &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp;pinMode(3, OUTPUT);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp;pinMode(4, OUTPUT);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp;pinMode(5, OUTPUT);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp;pinMode(6, OUTPUT);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp;pinMode(7, OUTPUT);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp;pinMode(8, OUTPUT);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp;pinMode(9, OUTPUT);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp;writeDot(0);&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;void writeDot(byte dot)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp;digitalWrite(9, dot);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;void sevenSegWrite(byte digit)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp;byte pin = 2;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp;for (byte segCount = 0; segCount &amp;lt; 7; ++segCount)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;digitalWrite(pin, seven_seg_digits[digit][segCount]);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;++pin;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;void loop()&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp;for (byte count = 10; count &amp;gt; 0; --count)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp; delay(1000);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp; sevenSegWrite(count - 1);&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp;delay(4000);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px; line-height: 15px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; color: #333399; font-size: 12px; line-height: 15px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/NyhfCcx6gRU?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://electronicasiprogramare.blogspot.com/feeds/6701721467113262852/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://electronicasiprogramare.blogspot.com/2011/01/arduino-si-7-segment-display.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/6701721467113262852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/6701721467113262852'/><link rel='alternate' type='text/html' href='http://electronicasiprogramare.blogspot.com/2011/01/arduino-si-7-segment-display.html' title='Arduino si 7-segment display'/><author><name>Cristi</name><uri>http://www.blogger.com/profile/00112816687340960322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7307277335928934782.post-4777786461546014441</id><published>2011-01-23T21:31:00.002+02:00</published><updated>2011-02-03T13:01:49.506+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="5v"/><category scheme="http://www.blogger.com/atom/ns#" term="Arduino Duemilanove soft magazin"/><category scheme="http://www.blogger.com/atom/ns#" term="control"/><category scheme="http://www.blogger.com/atom/ns#" term="releu"/><title type='text'>Controlul unui releu cu Arduino</title><content type='html'>&lt;a href=&quot;http://www.syntax.com.tw/proddata/RL/RL-RY5W-K.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;163&quot; src=&quot;http://www.syntax.com.tw/proddata/RL/RL-RY5W-K.JPG&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; Puteti controla un motor DC cu arduino prin intermediul unui releu, insa nu recomand aceasta metoda deoarece polaritatea se schimba brusc si nu puteti controla turatia motorului. In locul motorului se poate pune orice altceva, releul care il folosesc poate fi utilizat ca un switch. Cand releul este deschis trece curent pe o punte iar cealalta este inchisa, cand releul este inchis, puntea prin care trecea curent este inchisa si cealalta este deschisa.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Uitandu-ne de la stanga la dreapta:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;primul pin deschide si inchide releul&lt;/li&gt;
&lt;li&gt;al doilea este GND (pinul comun)&lt;/li&gt;
&lt;li&gt;al treilea este V1&lt;/li&gt;
&lt;li&gt;al patrulea este V2&lt;/li&gt;
&lt;/ul&gt;&amp;nbsp;(Pinii au simetrici pe partea cealalta a releului)&lt;br /&gt;
&lt;br /&gt;
COD:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void setup() { &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;pinMode(12, OUTPUT); &amp;nbsp; // pinul la care este conectat releul &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;digitalWrite(12, HIGH); &amp;nbsp; // merge inainte&lt;br /&gt;
&amp;nbsp;&amp;nbsp;delay(10000); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;digitalWrite(12, LOW); &amp;nbsp; &amp;nbsp;// merge inapoi&lt;br /&gt;
&amp;nbsp;&amp;nbsp;delay(10000); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;object width=&quot;320&quot; height=&quot;266&quot; class=&quot;BLOGGER-youtube-video&quot; classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot; data-thumbnail-src=&quot;http://3.gvt0.com/vi/gRJ_-uWT7ss/0.jpg&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/gRJ_-uWT7ss&amp;fs=1&amp;source=uds&quot; /&gt;&lt;param name=&quot;bgcolor&quot; value=&quot;#FFFFFF&quot; /&gt;&lt;embed width=&quot;320&quot; height=&quot;266&quot; src=&quot;http://www.youtube.com/v/gRJ_-uWT7ss&amp;fs=1&amp;source=uds&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://electronicasiprogramare.blogspot.com/feeds/4777786461546014441/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://electronicasiprogramare.blogspot.com/2011/01/controlul-unui-releu-cu-arduino.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/4777786461546014441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/4777786461546014441'/><link rel='alternate' type='text/html' href='http://electronicasiprogramare.blogspot.com/2011/01/controlul-unui-releu-cu-arduino.html' title='Controlul unui releu cu Arduino'/><author><name>Cristi</name><uri>http://www.blogger.com/profile/00112816687340960322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7307277335928934782.post-1027188136716944605</id><published>2011-01-22T18:21:00.002+02:00</published><updated>2011-01-22T19:26:34.682+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Arduino Duemilanove soft magazin"/><category scheme="http://www.blogger.com/atom/ns#" term="LCD Serial"/><category scheme="http://www.blogger.com/atom/ns#" term="LED"/><category scheme="http://www.blogger.com/atom/ns#" term="senzor de distanta"/><category scheme="http://www.blogger.com/atom/ns#" term="SHARP"/><title type='text'>Arduino si senzor de distanta SHARP</title><content type='html'>In urmatorul montaj folosesc:&lt;br /&gt;
&lt;div&gt;&lt;ul&gt;&lt;li&gt;Arduino Duemilanove&lt;/li&gt;
&lt;li&gt;SHARP GP2D120&lt;/li&gt;
&lt;li&gt;LCD Serial 16x2&lt;/li&gt;
&lt;li&gt;LED&lt;/li&gt;
&lt;/ul&gt;SHARP GP2D120 este un senzor de distanta analog; cu ajutorul valorilor returnate de acesta putem pune diferite conditii.&lt;/div&gt;&lt;div&gt;In montajul meu senzorul afiseaza valoarea pe LCD iar cand valoarea returnata de senzor e mai mica decat 70, se aprinde un LED.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;Senzorul se conecteaza la 5v, GND si pinul de semnal la un pin analog din arduino.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;COD:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;#include SoftwareSerial.h&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;int IRpin = 0;&lt;/div&gt;&lt;div&gt;int LED = 12;&lt;/div&gt;&lt;div&gt;#define rxPin 2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;#define txPin 3&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;SoftwareSerial LCD = &amp;nbsp;SoftwareSerial(rxPin, txPin);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;void setup() {&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;pinMode(rxPin, INPUT); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;pinMode(txPin, OUTPUT); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;pinMode(LED, OUTPUT); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;LCD.begin(9600); &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;void loop() {&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;float volts = analogRead(IRpin)* ((float) 5 / 1024);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;float distance = 65*pow(volts, -1.10);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; LCD.print(&quot;$CLEAR\n\r&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; LCD.print(&quot;$GO 1 4\n\r&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; LCD.print(&quot;$PRINT Distanta: \n\r&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; LCD.print(&quot;\n\r&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; LCD.print(&quot;$GO 2 1\n\r&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; LCD.print(&quot;$PRINT &quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; LCD.print(distance, DEC);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; LCD.print(&quot;\n\r&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; delay(100);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; if (distance&amp;lt;70)&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;digitalWrite(LED, HIGH); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; else&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;digitalWrite(LED, LOW);&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/F3HbwlZzxgk?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://electronicasiprogramare.blogspot.com/feeds/1027188136716944605/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://electronicasiprogramare.blogspot.com/2011/01/arduino-si-senzor-de-distanta-sharp.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/1027188136716944605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/1027188136716944605'/><link rel='alternate' type='text/html' href='http://electronicasiprogramare.blogspot.com/2011/01/arduino-si-senzor-de-distanta-sharp.html' title='Arduino si senzor de distanta SHARP'/><author><name>Cristi</name><uri>http://www.blogger.com/profile/00112816687340960322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7307277335928934782.post-4526190188340367691</id><published>2011-01-21T21:59:00.006+02:00</published><updated>2011-01-21T22:12:35.123+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="fotorezistenta"/><category scheme="http://www.blogger.com/atom/ns#" term="senzor lumina"/><title type='text'>Senzor lumina</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEith6Fgjf_1mSZGB-j52zNfhbb862eT2Gi7qsJ6zPQqMYGu_EOVLKlIamQsvk8k31GkDtpY5KxW6-isK7gFyBvNpzxczVnX2rpSGEz2yjTNJHhhojHG-VRWKVg7zZH3PswSEBgsNDcbSweU/s1600/141f0a9d5bf8d36b6e563c978fbc96c1.media.128x200.png&quot;&gt;&lt;img style=&quot;float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 128px; height: 200px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEith6Fgjf_1mSZGB-j52zNfhbb862eT2Gi7qsJ6zPQqMYGu_EOVLKlIamQsvk8k31GkDtpY5KxW6-isK7gFyBvNpzxczVnX2rpSGEz2yjTNJHhhojHG-VRWKVg7zZH3PswSEBgsNDcbSweU/s200/141f0a9d5bf8d36b6e563c978fbc96c1.media.128x200.png&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5564731526395632626&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height:normal&quot;&gt;     Puteti construi un sensor de lumina foarte usor. Aveti nevoie de cateva fire, o fotorezistenta si o rezistenta . Mai jos atasez o schema dupa care puteti construi senzorul.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height:normal&quot;&gt;   VCC se conecteaza la pinul de 5V de la arduino, GND la pinul GND si V_OUT la un pin analog de pe placuta arduino.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height:normal&quot;&gt;&lt;span style=&quot;mso-no-proof:yes&quot;&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height:normal&quot;&gt;COD:&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height:normal&quot;&gt;int V_OUT = 0; // conectam la pinul analog 0&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height:normal&quot;&gt;int&lt;span style=&quot;mso-spacerun:yes&quot;&gt;  &lt;/span&gt;LED =13; //&lt;span style=&quot;mso-spacerun:yes&quot;&gt;  &lt;/span&gt;conectam led la pinul 13(la arduino duemilanove este integrat in placuta)&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height:normal&quot;&gt;void setup()&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height:normal&quot;&gt;{&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height:normal&quot;&gt;pinMode(LED, OUTPUT); //seteaza pinul 13 ca iesire&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height:normal&quot;&gt;Serial.begin(9600);&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height:normal&quot;&gt;}&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height:normal&quot;&gt;void loop()&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height:normal&quot;&gt;{&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height:normal&quot;&gt;if (analogRead(V_OUT)&lt;80)&lt;style=&quot;mso-spacerun:yes&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;&lt;/span&gt;// daca valoarea citita la pinul analog 0 este mai mica de 80&lt;/style&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height:normal&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;     &lt;/span&gt;digitalWrite(LED, HIGH);&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                                            &lt;/span&gt;// aprinde ledu-ul&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height:normal&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt; &lt;/span&gt;else&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                                                                                     &lt;/span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt; &lt;/span&gt;//altfel&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height:normal&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;     &lt;/span&gt;digitalWrite(LED, LOW);&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                                             &lt;/span&gt;// stinge led-ul&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height:normal&quot;&gt;Serial.print(analogRead(V_OUT));&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height:normal&quot;&gt;}&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://electronicasiprogramare.blogspot.com/feeds/4526190188340367691/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://electronicasiprogramare.blogspot.com/2011/01/senzor-lumina.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/4526190188340367691'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/4526190188340367691'/><link rel='alternate' type='text/html' href='http://electronicasiprogramare.blogspot.com/2011/01/senzor-lumina.html' title='Senzor lumina'/><author><name>Cristi</name><uri>http://www.blogger.com/profile/00112816687340960322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEith6Fgjf_1mSZGB-j52zNfhbb862eT2Gi7qsJ6zPQqMYGu_EOVLKlIamQsvk8k31GkDtpY5KxW6-isK7gFyBvNpzxczVnX2rpSGEz2yjTNJHhhojHG-VRWKVg7zZH3PswSEBgsNDcbSweU/s72-c/141f0a9d5bf8d36b6e563c978fbc96c1.media.128x200.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7307277335928934782.post-7253013463915000031</id><published>2011-01-21T21:26:00.014+02:00</published><updated>2011-01-22T17:36:58.811+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Arduino Duemilanove soft magazin"/><category scheme="http://www.blogger.com/atom/ns#" term="cod"/><category scheme="http://www.blogger.com/atom/ns#" term="LCD Serial"/><category scheme="http://www.blogger.com/atom/ns#" term="senzor lumina"/><category scheme="http://www.blogger.com/atom/ns#" term="senzor temperatura"/><title type='text'>Senzor de temperatura si lumina</title><content type='html'>&lt;div&gt;&lt;blockquote&gt;&lt;/blockquote&gt;Va voi prezenta cum puteti realiza un termometru digital cu mai multe functii.&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;Pentru asta folosesc:&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;sensor de temperature LM35Z&lt;/li&gt;
&lt;li&gt;sensor de lumina( facut dintro fotorezistenta si  un potentiometru)&lt;/li&gt;
&lt;li&gt;LCD Serial 16x2&lt;/li&gt;
&lt;li&gt;LED&lt;/li&gt;
&lt;li&gt;Switch&lt;/li&gt;
&lt;li&gt;Arduino Duemilanove&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;Pe LCD va fi afisata temperature in grade C pe primul rand si valoarea senzorului de lumina pe randul doi. Cand switch-ul este actionat, pe LCD va aparea temperature in grade C (pe linia de sus in stanga), temperature in grade F (pe randul de sus in dreapta), temperature maxima inregistrata( pe randul doi in  stanga) si temperature minima inregistrata (pe randul doi dreapta).&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;Cand valoarea senzorului de lumina scade sub o anumita valoare se aprinde un LED.&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;Acest proiect poate fi imbunatatit, eu ofer un exemplu, de aici puteti ajunge oriunde; lasati imaginatia sa zboare:P .&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;(Afisarea datelor pe un ecran LCD Serial sper sa o intelegeti din explicatiile codului, daca nu lasati un comentariu si o sa postez afisarea datelor pe un LCD Serial cu Arduino Duemilanove)&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;Mai jos o sa scriu codul apoi voi posta un video.&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;COD:&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;/* &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;Este o aplicatie care foloseste un senzor de temperatura LM35Z, un senzor de lumina (alcatuit    dintr-o fotorezistenta si un potentiometru), un intrerupator,  un led si un LCDSerial. Aceasta aplicatie este deschisa imbunatatirii. &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;*/ &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;#include &lt;softwareserial.h&gt;                                               //  headeru-l interfetei serial pentru lcd&lt;/softwareserial.h&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;int tpin = 0;                                                             // declarare pin analog 2&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;int lpin = 1;                                                             // declarare pin analog 1&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;int tempc = 0, tempf = 0;                                                 // variabile pentru temperatura &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;int samples [ 8 ];                                                        // variabila pentru a face o precizare mai buna a temperaturii &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;int maxi = - 100 , mini = 100;                                            // temperatura maxima/minima &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;int i;                                                                    // declarare i&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;int LED = 12;                                                             // declarare pin digital 12&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;boolean s = 4;                                                            // declarare pin digital 4&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;#define rxPin 2                                                           // definire pin digital 2 pe Rx pentru a nu fi nevoit sa scot pinul cand upload-ez codlu&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;#define txPin 3                                                           // definire pin digital 3 Tx --||--&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;SoftwareSerial LCD =  SoftwareSerial(rxPin, txPin);                       // definire pinii Rx si Tx pentru interfata serial a lcd-ului&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;void setup ( )                                                       // functia in care se stabileste ce rol are fiecare pin&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;{ &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;pinMode(rxPin, INPUT);                                                   // stabileste pin-ul 2 ca intrare (nu este folosit, poate sa lipseasca din program si din aplicatie)&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;pinMode(txPin, OUTPUT);                                                  // stabileste pin-ul 3 ca iesire (este necesar afisarii lcd-ului&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;pinMode(s, INPUT);                                                       // stabileste pin-ul 4 ca intrare&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;pinMode(LED, OUTPUT);                                                    // stabileste pin-ul 12 ca iesire&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.begin(9600);                                                         // porneste comunicarea prin serial&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;} &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;void loop ( )                                                             // corpul functiei&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;led(); &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;for ( i = 0 ; i &amp;lt;= 7 ; i ++ )                                             // ia 8 valori de temperatura &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;samples [ i ] = (( 4.68 * analogRead( tpin ) * 70.6 ) / 1023.0);   // temperatura = (voltajul senzorului * voltajul de intrare din senzor * valoarea echivalenta in milivolti a temperaturii) / 1023 de pasi                                                                            &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;tempc = tempc + samples [ i ]; // variabila temperaturii tempc ia valoarea temperaturii calculata mai sus&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;delay ( 100 );                                                            // asteapta 1 minut&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;tempc = tempc / 8.0;                                                      // se imparte la 8 pentru o precizie mai buna &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;tempf = ( tempc * 9 ) / 5 + 32;                                           // transforma in fahrenheit &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;if ( tempc &amp;gt; maxi ) { maxi = tempc; }                                     // seteaza temperatura maxima inregistrata &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;if ( tempc &amp;lt; mini) {mini= tempc;}&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;if (digitalRead(s)==LOW)                                                  // daca valoarea lui &quot;s&quot; este low&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$CLEAR\n\r&quot;);                                                  // sterge lcd-ul&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$GO 1 1\n\r&quot;);                                                 // muta cursorul pe randul 1 caracterul 1&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$PRINT &quot;);                                                     // afiseaza&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print ( tempc );                                                      // valoarea afisata&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;\n\r&quot;);                                                        // incheie randul&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$GO 1 4\n\r&quot;);                                                 // muta cursorul pe randul 1 caracterul 4&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$PRINT C \n\r&quot;);                                               // afiseaza C (grade celsius)&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;\n\r&quot;);                                                        // incheie randul&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$GO 1 8\n\r&quot;);                                                 // muta cursorul pe randul 1 caracterul 8&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$PRINT &quot;);                                                     // afiseaza&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print ( tempf );                                                      // valoarea afisata&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;\n\r&quot;);                                                        // incheie randul&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$GO 1 12\n\r&quot;);                                                // muta cursorul pe randul 1 caracterul 12&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$PRINT F \n\r&quot;);                                               // afiseaza F&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;\n\r&quot;);                                                        // incheie randul&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$GO 2 1\n\r&quot;);                                                 // muta cursorul pe randul 2 caracterul 1&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$PRINT &quot;);                                                     // afiseaza maximul inregistrat in grade celsius&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print ( maxi );                                                       // afiseaza valoarea&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;\n\r&quot;);                                                        // incheie randul&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$GO 2 4\n\r&quot;);                                                 // muta cursorul pe randul 2 caracterul 4&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$PRINT MAX \n\r&quot;);                                             // afiseaza MAX&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;\n\r&quot;);                                                        // incheie randul&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$GO 2 8\n\r&quot;);&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$PRINT &quot;);&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print ( mini );&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;\n\r&quot;); &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$GO 2 12\n\r&quot;);&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$PRINT MIN \n\r&quot;);&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;\n\r&quot;);&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;delay ( 100 ); // intraziera pentru corpul functiei &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;else // daca valoarea lui &quot;s&quot; este high&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$CLEAR\n\r&quot;);&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$GO 1 1\n\r&quot;);&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$PRINT &quot;);&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print ( tempc );&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;\n\r&quot;);&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$GO 1 4\n\r&quot;);&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$PRINT C \n\r&quot;);&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;\n\r&quot;);&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$GO 2 1\n\r&quot;);                                             // muta cursorul pe randul 2 caracterul 1&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$PRINT &quot;);                                                 // afiseaza&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print (analogRead(lpin) );                                        // valoarea citita la pinul analog 1&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;\n\r&quot;);&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$GO 2 4\n\r&quot;);&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;$PRINT Candeli \n\r&quot;); &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;LCD.print(&quot;\n\r&quot;);&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;delay(100);                                                            // intarzie pentru corpul functiei&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;void led()&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;{ &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;if (analogRead(lpin)&amp;lt;80) // daca valoarea citita la pinul analog 1 este mai mica de 80&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;digitalWrite(LED, HIGH);                                            // aprinde ledu-ul&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;else //altfel&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;digitalWrite(LED, LOW);                                             // stinge led-ul&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/Qc09ufQWsa0?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;blockquote&gt;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://electronicasiprogramare.blogspot.com/feeds/7253013463915000031/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://electronicasiprogramare.blogspot.com/2011/01/senzor-de-temperatura-si-lumina.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/7253013463915000031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/7253013463915000031'/><link rel='alternate' type='text/html' href='http://electronicasiprogramare.blogspot.com/2011/01/senzor-de-temperatura-si-lumina.html' title='Senzor de temperatura si lumina'/><author><name>Cristi</name><uri>http://www.blogger.com/profile/00112816687340960322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7307277335928934782.post-5908910612708645856</id><published>2009-12-23T23:19:00.004+02:00</published><updated>2009-12-23T23:39:56.928+02:00</updated><title type='text'>Controlul unui LED RGB cu Arduino Duemilanove si potentiometru</title><content type='html'>Aici va voi prezenta cum puteti controla un LED RGB cu o placuta Arduino Duemilanove si &lt;em&gt;cu 3 potentiometre&lt;/em&gt;:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;COD:&lt;br /&gt;&lt;br /&gt;const int redpin = 9;&lt;br /&gt;const int greenpin = 10;&lt;br /&gt;const int bluepin = 11;&lt;br /&gt;&lt;br /&gt;const int redpotpin = 0;&lt;br /&gt;const int greenpotpin = 1;&lt;br /&gt;const int bluepotpin = 2;&lt;br /&gt;&lt;br /&gt;int currentcolorvaluered;&lt;br /&gt;int currentcolorvaluegreen;&lt;br /&gt;int currentcolorvalueblue;&lt;br /&gt;&lt;br /&gt;void setup()&lt;br /&gt;{&lt;br /&gt;pinMode(redpin, OUTPUT);&lt;br /&gt;pinMode(greenpin, OUTPUT);&lt;br /&gt;pinMode(bluepin, OUTPUT);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void loop()&lt;br /&gt;{&lt;br /&gt;currentcolorvaluered = (255 - (analogRead(redpotpin) / 4));&lt;br /&gt;currentcolorvaluegreen = (255 - (analogRead(greenpotpin) / 4));&lt;br /&gt;currentcolorvalueblue = (255 - (analogRead(bluepotpin) / 4));&lt;br /&gt;&lt;br /&gt;analogWrite(redpin, currentcolorvaluered);&lt;br /&gt;analogWrite(greenpin, currentcolorvaluegreen);&lt;br /&gt;analogWrite(bluepin, currentcolorvalueblue);&lt;br /&gt;}&lt;br /&gt;Pinii de la LED-ul RGB trebuie sa fie conectati la pini &lt;a href=&quot;http://www.arduino.cc/en/Tutorial/PWM&quot;&gt;PWM&lt;/a&gt;, si este bine sa puneti la fiecare pin al LED-ului(cathode) o rezistenta de 220 Ohmi.</content><link rel='replies' type='application/atom+xml' href='http://electronicasiprogramare.blogspot.com/feeds/5908910612708645856/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://electronicasiprogramare.blogspot.com/2009/12/aici-va-voi-prezenta-cum-puteti.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/5908910612708645856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/5908910612708645856'/><link rel='alternate' type='text/html' href='http://electronicasiprogramare.blogspot.com/2009/12/aici-va-voi-prezenta-cum-puteti.html' title='Controlul unui LED RGB cu Arduino Duemilanove si potentiometru'/><author><name>Cristi</name><uri>http://www.blogger.com/profile/00112816687340960322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7307277335928934782.post-2692554687606865671</id><published>2009-12-23T22:41:00.007+02:00</published><updated>2011-01-21T22:54:02.401+02:00</updated><title type='text'>Controlul unui LED RGB cu Arduino Duemilanove</title><content type='html'>Ce este un LED RGB? Un LED RGB este un LED care are 3 culori:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;rosu&lt;/li&gt;
&lt;li&gt;albastru&lt;/li&gt;
&lt;li&gt;verde&lt;/li&gt;
&lt;/ul&gt;si are 4 pini, dintre care unu mai lung(acela este pinul GND).&lt;br /&gt;
Bineinteles ca putem crea si noi un LED RGB cu ajutorul a 3 leduri, cu respectivele culori.&lt;br /&gt;
Vreti sa controlati un LED RGB cu arduino? Sunt mai multe &quot;metode&quot; dar cele mai importante din punctul meu de vedere sunt doar 2 &quot;metode&quot;:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;random&lt;/li&gt;
&lt;li&gt;cu potentiometru&lt;/li&gt;
&lt;/ul&gt;Am stabilit ca fiind cele mai importante aceste 2 &quot;metode&quot; deoarece de la ele se pot modifica si concepe alte &quot;metode&quot;.&lt;br /&gt;
Aici va voi prezenta cum sa controlati un LED RGB cu ajutorul unei placute, Arduino Duemilanove&lt;em&gt;, random&lt;/em&gt;:&lt;em&gt; &lt;/em&gt;&lt;br /&gt;
COD:&lt;br /&gt;
int pin1 = 9;&lt;br /&gt;
int pin2 = 10;&lt;br /&gt;
int pin3 = 11;&lt;br /&gt;
long value3;&lt;br /&gt;
long value2;&lt;br /&gt;
long value1;&lt;br /&gt;
long current_value3;&lt;br /&gt;
long current_value2;&lt;br /&gt;
long current_value1;&lt;br /&gt;
int x;&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
randomSeed(analogRead(0));&lt;br /&gt;
value1 = random(255);&lt;br /&gt;
current_value1 = value1;&lt;br /&gt;
value2 = random(255);&lt;br /&gt;
current_value2 = value2;&lt;br /&gt;
value3 = random(255);&lt;br /&gt;
current_value3 = value3;&lt;br /&gt;
analogWrite(pin1, current_value1);&lt;br /&gt;
analogWrite(pin2, current_value2);&lt;br /&gt;
analogWrite(pin3, current_value3);&lt;br /&gt;
value1 = random(255);&lt;br /&gt;
value2 = random(255);&lt;br /&gt;
value3 = random(255);&lt;br /&gt;
}&lt;br /&gt;
void loop()&lt;br /&gt;
{&lt;br /&gt;
x = random(3, 9);&lt;br /&gt;
// prima culoare&lt;br /&gt;
if (value1 &amp;gt; current_value1)&lt;br /&gt;
{&lt;br /&gt;
current_value1++;&lt;br /&gt;
analogWrite(pin1, current_value1);&lt;br /&gt;
delay(x);&lt;br /&gt;
}&lt;br /&gt;
if (value1 &amp;lt; current_value1) &lt;br /&gt;
{&lt;br /&gt;
current_value1--;&lt;br /&gt;
analogWrite(pin1, current_value1);&lt;br /&gt;
delay(x);&lt;br /&gt;
}&lt;br /&gt;
if (value1 == current_value1)&lt;br /&gt;
{&lt;br /&gt;
analogWrite(pin1, current_value1);&lt;br /&gt;
value1 = random(255);&lt;br /&gt;
}&lt;br /&gt;
// a doua culoare&lt;br /&gt;
if (value2 &amp;gt; current_value2)&lt;br /&gt;
{&lt;br /&gt;
current_value2++;&lt;br /&gt;
analogWrite(pin2, current_value2);&lt;br /&gt;
delay(x);&lt;br /&gt;
}&lt;br /&gt;
if (value2 &amp;lt; current_value2)&lt;br /&gt;
&lt;current_value2)&gt;{ current_value2--;&lt;/current_value2)&gt;&lt;br /&gt;
analogWrite(pin2, current_value2);&lt;br /&gt;
delay(x);&lt;br /&gt;
}&lt;br /&gt;
if (value2 == current_value2)&lt;br /&gt;
{&lt;br /&gt;
analogWrite(pin2, current_value2);&lt;br /&gt;
value2 = random(255);&lt;br /&gt;
}&lt;br /&gt;
//a treia culoare&lt;br /&gt;
if (value3 &amp;gt; current_value3)&lt;br /&gt;
{&lt;br /&gt;
current_value3++;&lt;br /&gt;
analogWrite(pin3, current_value3);&lt;br /&gt;
delay(x);&lt;br /&gt;
}&lt;br /&gt;
if (value3 &amp;lt;&amp;nbsp;current_value3)&lt;br /&gt;
{&lt;br /&gt;
current_value3--;&lt;br /&gt;
analogWrite(pin3, current_value3);&lt;br /&gt;
delay(x);&lt;br /&gt;
}&lt;br /&gt;
if (value3 == current_value3)&lt;br /&gt;
{&lt;br /&gt;
analogWrite(pin3, current_value3);&lt;br /&gt;
value3 = random(255);&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
Pinii care se conecteaza la LED-ul RGB trebuie sa fie &lt;a href=&quot;http://www.arduino.cc/en/Tutorial/PWM&quot;&gt;PWM&lt;/a&gt;, si este bine sa puneti la fiecare pin al LED-ului(cathode) o rezistenta de 220 Ohmi.&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.blogger.com/video.g?token=AD6v5dyWI1wkSLtUbxkGAT2Y2tP1GeMlGmNj2MlnRFE98_PoNduFqVqxpOn-slvoaa0F0UCusmj64aZgxLs57Ag9Qw&#39; class=&#39;b-hbp-video b-uploaded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://electronicasiprogramare.blogspot.com/feeds/2692554687606865671/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://electronicasiprogramare.blogspot.com/2009/12/controlul-unui-led-rgb-cu-arduino.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/2692554687606865671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/2692554687606865671'/><link rel='alternate' type='text/html' href='http://electronicasiprogramare.blogspot.com/2009/12/controlul-unui-led-rgb-cu-arduino.html' title='Controlul unui LED RGB cu Arduino Duemilanove'/><author><name>Cristi</name><uri>http://www.blogger.com/profile/00112816687340960322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7307277335928934782.post-3455489161601127143</id><published>2009-12-21T20:15:00.011+02:00</published><updated>2010-04-16T21:38:30.999+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="arduino program L293D"/><title type='text'>Controlul a 2 motoare DC cu Arduino Duemilanove si L293D</title><content type='html'>Pentru a controla 2 motorase DC cu Rduino Duemilanove este&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFyVlK6y4APvFD-rmHtDoDtM6FHaDx1nL6ZzBsfBaO40xdtLksZEaQakEN8f0U5wczFeV2Tvj9dCcLjV9LAuvgeYtLrkXJrLidyshBVHGzQAr8KwOPw9KTQZlfWS1WjUNSur71sOYcejdd/s1600-h/hbridge_labpinout.jpg&quot;&gt;&lt;img style=&quot;MARGIN: 0px 0px 10px 10px; WIDTH: 200px; FLOAT: right; HEIGHT: 120px; CURSOR: hand&quot; id=&quot;BLOGGER_PHOTO_ID_5417755092758422386&quot; border=&quot;0&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFyVlK6y4APvFD-rmHtDoDtM6FHaDx1nL6ZzBsfBaO40xdtLksZEaQakEN8f0U5wczFeV2Tvj9dCcLjV9LAuvgeYtLrkXJrLidyshBVHGzQAr8KwOPw9KTQZlfWS1WjUNSur71sOYcejdd/s200/hbridge_labpinout.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;nevoie de o punte-H, cea mai usor de folosit fiind L293D.&lt;br /&gt;Conectati pini de control la placuta arduino, iar pe cei de alimentare la baterie. Am sa scriu un programel in C++(softul de la arduino) cu ajutorul caruia puteti controla motorasele.&lt;br /&gt;&lt;br /&gt;COD:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;const int motor1a = 2; //H-bridge (pin2,1A), pinul digital 2 de la arduino se conecteaza cu&lt;br /&gt;// pinul 2(1A) de la L293D&lt;br /&gt;const int motor2a = 4; //H-bridge (pin4,2A), pinul digital 4 de la arduino se conecteaza cu&lt;br /&gt;// pinul 7(2A) de la L293D&lt;br /&gt;const int motor1b = 5; //H-bridge (pin5,4A), pinul digital 5 de la arduino se conecteaza cu&lt;br /&gt;// pinul 15(4A) de la L293D&lt;br /&gt;const int motor2b = 7; //H-bridge (pin7,3A), pinul digital 7 de la arduino se conecteaza cu&lt;br /&gt;// pinul 10(3A) de la L293D&lt;br /&gt;const int enable1 = 3; //H-bridge (pin3,1.2EN), pinul digital 3 de la arduino se conecteaza&lt;br /&gt;// cu pinul 1(1.2EN) de la L293D&lt;br /&gt;&lt;strong&gt;const int enable2 = 6; //H-bridge (pin6,3.4EN), pinul digital 6 de la arduino se conecteaza&lt;br /&gt;// cu pinul 9(3,4EN) de la L293D&lt;br /&gt;&lt;/strong&gt;const int ledPin = 13; // LED&lt;br /&gt;boolean val = HIGH; //setam val ca fiind boolean pentru a putea opera cu HIGH si LOW&lt;br /&gt;&lt;br /&gt;void setup()&lt;br /&gt;{&lt;br /&gt;// setam toti pinii pe care ii folosim ca fiind OUTPUT:&lt;br /&gt;pinMode(motor1a, OUTPUT);&lt;br /&gt;pinMode(motor2a, OUTPUT);&lt;br /&gt;pinMode(motor1b, OUTPUT);&lt;br /&gt;pinMode(motor2b, OUTPUT);&lt;br /&gt;pinMode(ledPin, OUTPUT);&lt;br /&gt;// setam pini de enable HIGH pentru a putea porni motoarele:&lt;br /&gt;digitalWrite(enable1, HIGH);&lt;br /&gt;&lt;strong&gt;digitalWrite(enable2, HIGH);&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;// clipeste ledPin de 3 ori. Asta trebuie sa se intample doar 1 data.&lt;br /&gt;// daca vezi ca ledul clipeste de mai multe ori inseamna ca s-a&lt;br /&gt;// resetat; probabil din cauza ca motorasele sunt arse&lt;br /&gt;// sau este un scurt circuit.&lt;br /&gt;blink(ledPin, 3, 100);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void Forward()&lt;br /&gt;{&lt;br /&gt;// motoarele merg inainte&lt;br /&gt;digitalWrite(enable1, HIGH);&lt;br /&gt;&lt;strong&gt;digitalWrite(enable2, HIGH);&lt;/strong&gt;&lt;br /&gt;digitalWrite(motor1a, HIGH);&lt;br /&gt;digitalWrite(motor2a, LOW);&lt;br /&gt;digitalWrite(motor1b, HIGH);&lt;br /&gt;digitalWrite(motor2b, LOW);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void Reverse()&lt;br /&gt;{&lt;br /&gt;// motoarele merg inapoi&lt;br /&gt;digitalWrite(enable1, HIGH);&lt;br /&gt;&lt;strong&gt;digitalWrite(enable2, HIGH);&lt;/strong&gt;&lt;br /&gt;digitalWrite(motor1a, LOW);&lt;br /&gt;digitalWrite(motor2a, HIGH);&lt;br /&gt;digitalWrite(motor1b, LOW);&lt;br /&gt;digitalWrite(motor2b, HIGH);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void Left()&lt;br /&gt;{&lt;br /&gt;// intoarce la stanga(motorul drept merge inainte, iar cel stang inapoi):&lt;br /&gt;digitalWrite(enable1, HIGH);&lt;br /&gt;&lt;strong&gt;digitalWrite(enable2, HIGH);&lt;/strong&gt;&lt;br /&gt;digitalWrite(motor1a, LOW);&lt;br /&gt;digitalWrite(motor2a, HIGH);&lt;br /&gt;digitalWrite(motor1b, HIGH);&lt;br /&gt;digitalWrite(motor2b, LOW);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void Right()&lt;br /&gt;{&lt;br /&gt;//intoarce la dreapta(motorul drept merge inapoi iar cel stang inainte):&lt;br /&gt;digitalWrite(enable1, HIGH);&lt;br /&gt;&lt;strong&gt;digitalWrite(enable2, HIGH);&lt;/strong&gt;&lt;br /&gt;digitalWrite(motor1a, HIGH);&lt;br /&gt;digitalWrite(motor2a, LOW);&lt;br /&gt;digitalWrite(motor1b, LOW);&lt;br /&gt;digitalWrite(motor2b, HIGH);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void Stop()&lt;br /&gt;{&lt;br /&gt;//motoarele sunt oprite(1,2EN si 3,4EN sunt trecuti pe LOW ; in acest caz nu se tine cont de valoarea pinilor de control, deoarece motoarele sunt oprite. vezi desenu sa intelegi mai bine)&lt;br /&gt;digitalWrite(enable1, LOW);&lt;br /&gt;&lt;strong&gt;digitalWrite(enable2, LOW);&lt;/strong&gt;&lt;br /&gt;digitalWrite(motor1a, LOW);&lt;br /&gt;digitalWrite(motor2a, LOW);&lt;br /&gt;digitalWrite(motor1b, LOW);&lt;br /&gt;digitalWrite(motor2b, LOW);&lt;br /&gt;}&lt;br /&gt;/*&lt;br /&gt;blinks a LED&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;void blink(int whatPin, int howManyTimes, int milliSecs)&lt;br /&gt;{&lt;br /&gt;int i = 0;&lt;br /&gt;for(i=0; i&lt;=3; i++)&lt;div&gt;{ digitalWrite(ledPin, HIGH);&lt;/div&gt;&lt;div&gt;delay(100/2);&lt;/div&gt;&lt;div&gt;digitalWrite(ledPin, LOW);&lt;/div&gt;&lt;div&gt;delay(100/2);  } }&lt;/div&gt;&lt;div&gt;void loop()&lt;/div&gt;&lt;div&gt;{                                       //delay(x) reprezinta timpul in care se executa operatia(x se inlocuieste cu o valoare)&lt;/div&gt;&lt;div&gt;Forward(); &lt;/div&gt;&lt;div&gt;delay(5000);&lt;/div&gt;&lt;div&gt;Stop();&lt;/div&gt;&lt;div&gt;delay(100);&lt;/div&gt;&lt;div&gt;Right();&lt;/div&gt;&lt;div&gt;delay(5000);&lt;/div&gt;&lt;div&gt;Stop();&lt;/div&gt;&lt;div&gt;delay(100);&lt;/div&gt;&lt;div&gt;Left();&lt;/div&gt;&lt;div&gt;delay(5000);&lt;/div&gt;&lt;div&gt;Stop();&lt;/div&gt;&lt;div&gt;delay(100);&lt;/div&gt;&lt;div&gt;Reverse();&lt;/div&gt;&lt;div&gt;delay(5000);&lt;/div&gt;&lt;div&gt;Stop();&lt;/div&gt;&lt;div&gt;delay(1000);  }&lt;/div&gt;&lt;div&gt; Daca vreti, puteti elibera un pin, conectand pinul 3,4EN la 1,2EN, si stergeti din program tot ce contine 3,4EN (tot ce este ingrosat). daca folositi ambi pini de ENABLE puteti opri fiecare motor separat, puteti crea alt program, totul depinde de imaginatie. &lt;em&gt;Pini de enable trebuie conectati la pini cu semnal PWM.&lt;/em&gt;&lt;div&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/div&gt;&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.blogger.com/video.g?token=AD6v5dwh9Z4o9ZbtZe5qEG-tfHS0uluVoCoCaAF9aAmeVnBGh06vqakE6BkqZ0FyMDD27l8wwfgqe2Gv_5Rh9deCKw&#39; class=&#39;b-hbp-video b-uploaded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://electronicasiprogramare.blogspot.com/feeds/3455489161601127143/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://electronicasiprogramare.blogspot.com/2009/12/controlul-2-motoare-dc-cu-arduino.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/3455489161601127143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/3455489161601127143'/><link rel='alternate' type='text/html' href='http://electronicasiprogramare.blogspot.com/2009/12/controlul-2-motoare-dc-cu-arduino.html' title='Controlul a 2 motoare DC cu Arduino Duemilanove si L293D'/><author><name>Cristi</name><uri>http://www.blogger.com/profile/00112816687340960322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFyVlK6y4APvFD-rmHtDoDtM6FHaDx1nL6ZzBsfBaO40xdtLksZEaQakEN8f0U5wczFeV2Tvj9dCcLjV9LAuvgeYtLrkXJrLidyshBVHGzQAr8KwOPw9KTQZlfWS1WjUNSur71sOYcejdd/s72-c/hbridge_labpinout.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7307277335928934782.post-1763548254946555545</id><published>2009-12-21T19:28:00.010+02:00</published><updated>2009-12-21T21:49:48.396+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="L293D descriere motoare DC"/><title type='text'>Descriere L293D pentru conectarea a 2 motorase DC</title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2Fp_ympl_70e0SZsHGIRasV-SiTXDPP1Tlyhso145dAW8vOvyWtsmxoMfDgyreyX7FSdrJEW7ThOwrMT52TOjSR9I0Y5AhH3EC4YaEIkoQ1ftfVoCUZlVcM33EzAfEY88OQj-ETDhAuOc/s1600-h/l293d_pl.jpg&quot;&gt;&lt;img style=&quot;MARGIN: 0px 10px 10px 0px; WIDTH: 200px; FLOAT: left; HEIGHT: 150px; CURSOR: hand&quot; id=&quot;BLOGGER_PHOTO_ID_5417745074761683970&quot; border=&quot;0&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2Fp_ympl_70e0SZsHGIRasV-SiTXDPP1Tlyhso145dAW8vOvyWtsmxoMfDgyreyX7FSdrJEW7ThOwrMT52TOjSR9I0Y5AhH3EC4YaEIkoQ1ftfVoCUZlVcM33EzAfEY88OQj-ETDhAuOc/s200/l293d_pl.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;L293D este cea mai usoara calea pentru construirea unui driver pentru motoare deoarece trebuie doar sa lipiti firele de la motorase la integrat, pini de control la microcontroler, si pini de alimentare la baterie.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZtgg86OLyT19RhUKFkDUal5hj0WN88ycDUEU4YUD1FgOEnNCfnVTyYIFiTWUTZEzgnbAhpbYD2mDpoNM1Ss9gt-li1XsWmOa0h4rYEkojmEFDg0fFdYLb9K3UJfaWRHqcB9rsqVMGUNm9/s1600-h/hbridge_labpinout.jpg&quot;&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPCneZGnMhOlbjw2Xsz07aXCQ4DMe5KPYI76beZxryHKwD0OFAS7AYasDo34A-K3b7-gSPeeP964S1hZYVJxNtLrxXEZPA86gZgcw_6HqZ8usGHRjJJVdmx7HsJZ2OatY81k7i563bcR-/s1600-h/L293D_pinout.png&quot;&gt;&lt;img style=&quot;MARGIN: 0px 10px 10px 0px; WIDTH: 200px; FLOAT: left; HEIGHT: 116px; CURSOR: hand&quot; id=&quot;BLOGGER_PHOTO_ID_5417745693207638514&quot; border=&quot;0&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPCneZGnMhOlbjw2Xsz07aXCQ4DMe5KPYI76beZxryHKwD0OFAS7AYasDo34A-K3b7-gSPeeP964S1hZYVJxNtLrxXEZPA86gZgcw_6HqZ8usGHRjJJVdmx7HsJZ2OatY81k7i563bcR-/s200/L293D_pinout.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Pinul16(Vcc1) se alimenteaza la o tensiune de 5V.&lt;br /&gt;Pinul8(Vcc2) se alimenteaza la o tensiune maxima de 24V, acesta este pinul de la care motoarele primesc curent.&lt;br /&gt;Pini4,5,13,12 sunt GND, deci ii conectati pe toti 4 intre ei si apoi ii conectati la minusul sursei de alimentare pentru Vcc1 si Vcc2.&lt;br /&gt;Pinul1(1,2EN) este pinul de ENABLE pentru primul motoras si se conecteaza la microcontroler sau la Vcc1, in functie de programul pe care il folositi pentru a controla primul motoras.&lt;br /&gt;Pini3,6(1Y,2Y) sunt pini care se conecteaza la un motoras DC.&lt;br /&gt;Pini2,7(1A,2A) sunt pini de control pentru un motoras care se conecteaza la microcontroler.&lt;br /&gt;Pinul9(3,4EN) este pinul de ENABLE pentru al doilea motoras, care se conecteaza la microcontroler sau la Vcc1, in functie de programul pe care il folositi in controlarea celui de al doilea motoras.&lt;br /&gt;Pini14,11(4Y,3Y) sunt pini care se conecteaza la un al doilea motoras DC.&lt;br /&gt;Pini15,10(4A,3A) sunt pini de control pentru cel de al doilea motoras, care se conecteaza la microcontroler.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Pinul1 si pinul 9 (pinii de enable) sunt ca un fel de intrerupatoare; pinul1 cand este strabatut de un curent electric cu o tensiune de 5V permite curentului electric sa ajunga la primul motor, cat timp nu este strabatut de un curent electric, acesta nu permite miscarea motorului deoarece nu mai permite curentului electric sa ajunga la motor. Pinul9 face acelasi lucru numai ca pentru al doilea motor.&lt;br /&gt;Pinul2 ,pinul7, pinul15 si pinul10 (1A,2A , 4A,3A) sunt pini de control a celor 2 motoare; daca vreti ca ambele motoare sa mearga intr-o directie, trebuie ca pinul2(1A) si pinul15(4A) sa aiba aceeasi valoare.</content><link rel='replies' type='application/atom+xml' href='http://electronicasiprogramare.blogspot.com/feeds/1763548254946555545/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://electronicasiprogramare.blogspot.com/2009/12/descriere-l293d-pentru-conectarea-2.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/1763548254946555545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/1763548254946555545'/><link rel='alternate' type='text/html' href='http://electronicasiprogramare.blogspot.com/2009/12/descriere-l293d-pentru-conectarea-2.html' title='Descriere L293D pentru conectarea a 2 motorase DC'/><author><name>Cristi</name><uri>http://www.blogger.com/profile/00112816687340960322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2Fp_ympl_70e0SZsHGIRasV-SiTXDPP1Tlyhso145dAW8vOvyWtsmxoMfDgyreyX7FSdrJEW7ThOwrMT52TOjSR9I0Y5AhH3EC4YaEIkoQ1ftfVoCUZlVcM33EzAfEY88OQj-ETDhAuOc/s72-c/l293d_pl.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7307277335928934782.post-4614486699068765510</id><published>2009-12-21T19:14:00.001+02:00</published><updated>2009-12-21T21:49:11.531+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Arduino Duemilanove soft magazin"/><title type='text'>Arduino Duemilanove</title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiONd0UYv_dA797DM59XpgbFGF286vjlequuz5KsnNwLRDUnbJcwGQiksvtid5DIZuA4bxIYjXc7scd65nk55WVygGzN9RhJ0NZly7HgXPE50FW36jeSgwV1laJ76WiZwpC9RxYpQQ1fK4v/s1600-h/arduino_duemilanove_redo.jpg&quot;&gt;&lt;img style=&quot;MARGIN: 0px 10px 10px 0px; WIDTH: 200px; FLOAT: left; HEIGHT: 144px; CURSOR: hand&quot; id=&quot;BLOGGER_PHOTO_ID_5417739642576899234&quot; border=&quot;0&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiONd0UYv_dA797DM59XpgbFGF286vjlequuz5KsnNwLRDUnbJcwGQiksvtid5DIZuA4bxIYjXc7scd65nk55WVygGzN9RhJ0NZly7HgXPE50FW36jeSgwV1laJ76WiZwpC9RxYpQQ1fK4v/s200/arduino_duemilanove_redo.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Este o platforma care foloseste un Microcontroler ATMega328 32K, are 14 pini digital si 6 pini analog. Este foarte usor de programat; foloseste C++. Softul care il puteti &lt;a href=&quot;http://arduino.cc/en/Main/Software&quot;&gt;downloada&lt;/a&gt; este insotit de exemple cu ajutorul carora intelegeti mai bine cum functioneaza aceasta platforma.&lt;br /&gt;In romania puteti cumpara Arduino Duemilanove de &lt;a href=&quot;http://www.shop.turuga.ro/arduino/arduino-duemilanove&quot;&gt;aici&lt;/a&gt;.&lt;br /&gt;&lt;a href=&quot;http://netzwelten.files.wordpress.com/2009/03/arduino_board.jpg&quot;&gt;Vizualizati&lt;/a&gt; o descriere cu privire la aceasta platforma.</content><link rel='replies' type='application/atom+xml' href='http://electronicasiprogramare.blogspot.com/feeds/4614486699068765510/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://electronicasiprogramare.blogspot.com/2009/12/arduino-duemilanove.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/4614486699068765510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7307277335928934782/posts/default/4614486699068765510'/><link rel='alternate' type='text/html' href='http://electronicasiprogramare.blogspot.com/2009/12/arduino-duemilanove.html' title='Arduino Duemilanove'/><author><name>Cristi</name><uri>http://www.blogger.com/profile/00112816687340960322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiONd0UYv_dA797DM59XpgbFGF286vjlequuz5KsnNwLRDUnbJcwGQiksvtid5DIZuA4bxIYjXc7scd65nk55WVygGzN9RhJ0NZly7HgXPE50FW36jeSgwV1laJ76WiZwpC9RxYpQQ1fK4v/s72-c/arduino_duemilanove_redo.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>