Recent Posts

Pages: 1 [2] 3 4 ... 10
11
Project Guidance / Re: Arduino with battery back-...
Last post by dankgus - Today at 03:56 am
dankgus -

Can you tell me how much that newegg unit weighs?
I just put it on my kitchen scale.  261g including the little 6" USB cable cable.  It's rated at 10400mah so it's pretty serious overkill for what I am using it for.  
12
I would triple check your connections, I cant really tell based on the pictures... but I was having an impossible time getting a 433mhz radio to work, and it turned out I had the positive and negative wires swapped.

if you have a meter, check for continuity between the 5v pins, ground pins, and data pins.
13
Hi, I have recently been trying to hook up my servo to my light switch in my room and have it be controlled by both a momentary push button and an IR remote.

My goal is to have the servo be able to be in 2 positions, each either turning the light on or off. I tried to make it so the button and the IR codes would be able to tell the current position of the servo and change to be in the opposite position when either the button is pressed or the IR receiver receives the proper code from the remote.

The code I currently have is my best attempt to mash up the two separate codes. One for the button and one for the IR. The momentary button is doing it's job properly when I uploaded the code to my Arduino but when ever I press the IR remote once the servo will continue move back and forth between the two positions without stopping and without me pressing any buttons.

This is my first time posting and I did my best to look for any solutions already out there. Any help to improve the code and solve my problem would be much appreciated. Thank you.

Here is the code
Code: [Select]
#include <Servo.h>

#include <IRremote.h>

int inPin = 2;         // the number of the momentary input pin

int reading;           // the current reading from the input pin
int previous = LOW;    // the previous reading from the input pin

int IRpin = 11;  // pin for the IR sensor
IRrecv irrecv(IRpin);
decode_results results;

Servo myservo;

boolean SRVOstate = false; // Initialize the state of servo as off/down

long time = 0;         // the last time the output pin was toggled
long debounce = 200;   // the debounce time, increase if the output flickers

void setup()
{
  pinMode(inPin, INPUT);
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
  myservo.attach(9);
}

void loop()
{
  reading = digitalRead(inPin);

  if (reading == HIGH && previous == LOW && millis() - time > debounce) //if momenatary is pressed
  {
    if (SRVOstate == true) //current state of servo
    {
      SRVOstate = false; //set the new state
      myservo.write(80); //servo down posistion
    }
    else
    {
      SRVOstate = true; //set the new state
      myservo.write(170); //servo up posistion
    }

    time = millis();   
  }
  previous = reading;
 
  if (irrecv.decode(&results))
    {
     
      irrecv.resume();   // Receive the next value
    }
 
  if (results.value == 2189279550)  //if IR remote value is recieved
     {
       if (SRVOstate == false)   //current state of servo
         {
           SRVOstate = true;   //set the new state
           myservo.write(170); //servo up posistion
           delay(1000);      // keeps the transistion smooth
             
         }
        else
          {
            SRVOstate = false; //set the new state
            myservo.write(80); //servo down posistion
            delay(1000);
          }
         
     }
 
}
   
14
Software / Re: ¿Como funciona Comunicacio...
Last post by Raulitus - Today at 03:48 am
Uso serial1 ya que en Leonado el serial se reserva para la comunicación con el USB. El código de reenviar lo se serial1 a serial lo vi en un fix del Leonado (Aunque no me queda claro lo que hace).

Entonces en el Leonardo poniendo el mismo código que en UNO cambiando el delay por 500 no consigo nada. Y ambos leds se encienden cada segundo.

¿Podría ser por usar el mismo caracter H y L?
15
Hardware / Re: first mismatch at byte 0x0...
Last post by resKte - Today at 03:44 am
Ya lo baje .... y lo estoy tratando de entender ....de apoco y cuando resuelva el problema lo paso al foro.... :smiley-sweat: :smiley-sweat:
16
Project Guidance / Re: What wireless modules?
Last post by Qdeathstar - Today at 03:43 am
I'm trying to produce a system consisting of arduinos (x5) connected to both sensors and outputs and a raspberry pi as a central control unit and data logger. I want to do this wirelessly and for data to be able to be passed in both directions ie pi to arduino and arduino to pi to allow me to send commands from the pi and for the pi to receive sensor data.
What wireless modules would you suggest? I've tried the nrf2401+ transcievers and no matter what i try i just cant get them to work using any of the example codes and libraries i can find (the connections are good and the addressing is ok, they just wont talk). My only other thought was to use bluetooth modules? HC - 06? I'd imagine in order to use a large number of these on the pi id either need a bluetooth adapter on the pi capable of multiple connections or to code the connections to be made only when data needs to transfer, then disconnect until the next transfer event. Or to try the 433 MHz Transcievers HC-11.

Thanks.
I was also having problems with getting the nrf2401s to work, so I went with 433mhz....


the set up is much simpler... but, you'd have to have both the receiver and transmitter on every board..
17
Software / Re: COMO LEER UNA TENSION DE P...
Last post by resKte - Today at 03:41 am
Te juro que asta que no vi el video, no entendia de que trataba la bobina .... jejejejeje
no te podes olvidar el "TENIENTE" JEJEJEJE ..... Bueno es ver que lo solucionaron ...
18
Programming Questions / Re: Counting on a TM1637
Last post by aarg - Today at 03:39 am
The TM1637 library you're using should have documentation to tell you how to blank a digit. If it's at all like the TM1638 library I'm using, it will also have a single function to send a decimal value to the display, using all the digits. So you wouldn't have to go through all those machinations.
19
Hi,

I bought an Arduino Uno R3 a few weeks ago and have been playing with it successfully running IDE 1.6.2 on OS X 10.10.2. Today I was looking into one of Adafruits libraries that said it had some issues with the 1.6 IDEs so i downloaded the 1.0.6 IDE.

After opening up the 1.0.6 IDE, I could no longer see the serial connection through the Tools -> Serial Port menu.

The only other thing I changed was i used an external power adapter for the first time (12v 1.5A).

I don't see how either of these would affect the serial connection but it just will not work.

Any help is appreciated!!
20
Project Guidance / Re: What wireless modules?
Last post by Nick_Pyner - Today at 03:34 am
I'm trying to produce a system consisting of arduinos (x5) connected to both sensors and outputs and a raspberry pi as a central control unit and data logger.
I don't understand why you need a Raspberry Pi to do thsi

Quote
I've tried the nrf2401+ transcievers and no matter what i try i just cant get them to work using any of the example codes and libraries i can find (the connections are good and the addressing is ok, they just wont talk).
I think that is the hard part, and the rest is just how you form and present the data. If that is the problem, you are likely to encounter the same problem with other means of transmission.

Quote
My only other thought was to use bluetooth modules? HC - 06? I'd imagine in order to use a large number of these on the pi id either need a bluetooth adapter on the pi capable of multiple connections or to code the connections to be made only when data needs to transfer, then disconnect until the next transfer event.
I believe bluetooth is more suitable for talking to the outside world rather than forming a network, and the NRF is a better solution. Nonetheless I believe it is possible to do what you say, but the base station at least will have to be an HC-05. The HC-06 is slave only and has limited configuration. I believe the HC-05 can be configured on the fly and have the appropriate AT commands sent to it as part of the polling process.

Note that the most popular installation for the HC-05 was it mounted on a JY-MCU board. These are now apparently becoming less popular and are being replaced by boards like the ZS-040, which feature a little button switch to make configuration easier. This sounds like a really good idea but, for your purposes, I suspect it is a really bad one and the JY-MCU is a better bet.

Pages: 1 [2] 3 4 ... 10

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy