Recent Posts

Pages: [1] 2 3 ... 10
Audio / Re: I’d like to know how to us...
Last post by DVDdoug - Today at 05:56 am
Would you mind explaining to me why speakers like this need to be wired in such a manner?
From the ATmega chip datasheet, the "absolute maximum" allowable current from an output pin is 40mA (0.04 Amps).

It puts-out 5V (when high) and from Ohm's Law we can calculate a minimum resistance (or impedance) of 125 Ohms.

If you connect a 4 or 8 Ohm speaker you'll get too much current (the output voltage will drop) and "bad things" can happen.  The chip can overheat and worst case, you can fry it!

Additionally, would you be able to inform me of a method to determine which amplifier I should use, or perhaps the place where I could find that information?
Any audio "power amplifier" will work.

I have one like this for "TV sound" through some small speakers in my bedroom.

but may want to do chords later
That's going to be a problem for the Arduino...

Displays / Re: What i do Wrong? I2c, comm...
Last post by bperrybap - Today at 05:53 am
Look at the IRremote example sketches to see how to properly initialized the library to receive IR codes.
You are not initializing the library before trying to use it.
You must call irrecv.enableIRIn() in setup() to turn on the receiver.

Also, lcd.begin() should only be called once in setup()

--- bill

and this is the coding for the sonar sensor:

Code: [Select]

int trigPin1=4;
int echoPin1=2;

int trigPin2=6;
int echoPin2=7;

void setup() {
  Serial.begin (9600);
  pinMode(trigPin1, OUTPUT);
  pinMode(echoPin1, INPUT);
  pinMode(trigPin2, OUTPUT);
  pinMode(echoPin2, INPUT);


void loop() {
  long duration1, distance1;
  digitalWrite(trigPin1, LOW);  //
  delayMicroseconds(2); //
  digitalWrite(trigPin1, HIGH);
  delayMicroseconds(10); //
  digitalWrite(trigPin1, LOW);
  duration1 = pulseIn(echoPin1, HIGH);
  distance1 = (duration1) / 29.1/2; //converts value from sensor to cm (divided by two to compensate for relay time)

   if (distance1 >= 1000 || distance1 <= 0){
    Serial.println("Out of range");
  else {
    Serial.print ( "Sensor1  ");
    Serial.print ( distance1);
LEDs and Multiplexing / Re: Two arduinos, Same led
Last post by TomGeorge - Today at 05:52 am
I am working on a smart home project. i am using a lot of modules gsm, bluetooth , wifi ect..
these modules are connected to two different arduinos but need to control the same devices.
I was just testing with one led to find a solution.
Wich components are you talking about? thank you in advance
How will each arduino know if the LED is ON or OFF already?
How will arduinoA know if arduinoB hasn't already turn the LED ON?
You can't just get them each to toggle it ON/OFF unless you know its current state.
Tom... :)
Genuinely, Phytolast is easy. This is exclusive news. Phytolast Magazine had a series of columns entitled "Basics of Phytolast" OK, my step sister mentions often referring to doing it, "Idle hands are the devil's workshop." I am not too sobered by that. Here's what you can expect from doing it. You understand this, right? Obviously, come on, let's face it. That isn't all that traditional but it works. Using it isn't only a hobby for me and I enjoy doing this. Do you have a site? We'll find old strategies. We'll deal with the best loved opinions in respect to that question. We made a couple of valid notions. You might decide to save gold and buy a discretion in bulk. When their buzzword occurs I usually guess that now things are starting to settle down. It cannot be argued, but I shouldn't see that. Phytolast is not as rosy as that might first appear.
this is the line following code:

Code: [Select]
int leftInput=A3;
int rightInput=A0;
int centreInput=A2;
int LM1=5;
int RM1=3;

int LM2=9;
int RM2=10;

int leftValue = 0;
int rightValue = 0;
int centreValue = 0;
void setup()
  pinMode(LM1, OUTPUT);
  pinMode(LM2, OUTPUT);
  pinMode(RM1, OUTPUT);
  pinMode(RM2, OUTPUT);

void loop()
  leftValue = analogRead (leftInput);
  rightValue = analogRead (rightInput);
  centreValue = analogRead (centreInput);

   ( leftValue <100 && rightValue <100 && centreValue >800)
    digitalWrite(LM1, HIGH);
    digitalWrite(LM2, LOW);
    digitalWrite(RM1, HIGH);
    digitalWrite(RM2, LOW);
   else {
     ( leftValue >800 && rightValue <100 && centreValue >800)
    digitalWrite(LM1, LOW);
    digitalWrite(LM2, LOW);
    digitalWrite(RM1, HIGH);
    digitalWrite(RM2, LOW);
 else {

( leftValue <100 && rightValue >100 && centreValue >800)
    digitalWrite(LM1, HIGH);
    digitalWrite(LM2, LOW);
    digitalWrite(RM1, LOW);
    digitalWrite(RM2, LOW);
   else {

if ((leftValue <200) && (rightValue <200) && (centreValue <200))
digitalWrite(LM1, LOW);
digitalWrite(LM2, LOW);
digitalWrite(RM1, LOW);
digitalWrite(RM2, LOW);

I've read many bootloader posts and learned there are two commonly available bootloader speeds, 8Mhz and 16Mhz.   Folks asking about other speeds 10Mhz etc are told to stay with the standard speeds or it gets complicated quickly.

My question is;  what is unique about each speed of bootloader that makes moving to a different frequency so painful?  I understand the basic concept of a bootloader, but do not know why it paired so strictly to a specific frequency.  Is it as simple as the USART speed would be off if the target clock were not as expected by the bootloader.   Is there more?  I've seen some posts talking about fuses, I didn't think it was possible for the bootloader to change a fuse setting.

Project Guidance / permanent program
Last post by sjoefl01 - Today at 05:44 am
I was under the impression that when I completed my project using a NANO I could burn my code to the NANO and use it without a PC connected. I think I went down a rabbit hole chasing comments on boot loader. My program is working and I just want to connect a power supply and disconnect the computer. Is this possible? I have plenty of NANOs.   
Project Guidance / Re: Using I2C
Last post by TomGeorge - Today at 05:42 am
Hello all,

So, my question today is if there is an i2c compatible device that can control audio.

We have Arduino MEGAs for a project.

We're trying to use i2c to send a signal to a device (holding an sd card with a soundtrack on it).
The device will start playing a soundtrack through speakers when a certain condition has been fulfilled.

Again, is there an i2c device capable of this?

google     arduino audio player

Tom.... :)
Project Guidance / Re: Using I2C
Last post by Delta_G - Today at 05:40 am
Does it absolutely have to be I2C?   Why?  I would suggest the dfplayer but I don't know what protocol it communicates with.  I think it uses serial but that shouldn't be any problem for a mega. 
Pages: [1] 2 3 ... 10