Hardware for a new project (Arduino Mini, Wireless, LEDs)

Hi!

My second post here on the Arduino Forums so please be gentle :). I would like to ask for your advice regarding a new project I'm trying to work on. I want to use an Arduino Mini board with an attached Wireless shield to light up a few LEDs via a wireless connection. Basically what I want to achieve is that the Arduino Mini board to connect wirelessly to a PC or wireless HUB/router and to get some data (based on some general rules/conditions) which ultimately to light up (or not) a couple of LEDs (1 LED will do it for the moment - can handle the others later).

Since I'm not sure what wireless shield can I use (or which wireless shield is recommended for this) I really need your advice/help. Again, think at something really simple: An Arduino mini which connect wirelessly to the internet and get some DATA which leads to the LED status (on/off).

I might not have the best approach for this so if this is the case I would kindly ask you to point me to the right path. I'm really newbie at this; been playing around with an Arduino UNO for a while now but I don't want to invest too much in different boards and shields just because my knowledge in this area is limited.

I'm sure somebody around here will understand my idea so please, if you have any idea where to start, what should I consider before, which are the best options, do let me know. It would be much much appreciated! :slight_smile:

Thanks!

One way to skin that cat would be to attach a bluetooth serial adapter to the mini, rendering it portable/wireless, and control it over bluetooth serial from the PC side with something like Bitlash Commander: GitHub - billroy/bitlash-commander: Web-based dashboard builder for Arduino. -- which also exposes a web control panel interface so you can switch your LED on and off in the browser.

Mind the 3.3V vs. 5V supply and signal issues when you buy stuff to go with the Mini, especially if you are thinking about going with a shield for the regular Arduino form factor and some ad-hoc wiring.

Good luck with your project,

-br

You can use either bluetooth, wifi, ethernet, RF, or IR.

Which ever is cheaper. This forum probably has hundreds of simple samples, i've got a few myself that I can give you.

But first try to write a code that can turn an LED on and off when it receives a "H" or "L" from the serial monitor.

try this.

LEDpin = 13;  //on-board LED pin 13

void setup() {
pinMode(LEDpin, OUTPUT);
Serial.begin(9600);
}

void loop() {
    if(Serial.available() ) { // if you have data to be read

     char Data = Serial.read();  //get data
      if (Data == 'H' || Data =='h') {  //check if incoming data meets requirments to turn on LED  
         digitalWrite(LEDpin, HIGH); //turn on LED
      }

      else if(Data == 'L' || Data =='l') { //check if incoming data meets requirments to turn off LED  
         digitalWrite(LEDpin, LOW);//turn off LED
      }

      else { } //nothing
    }
}

That's a good place to start.

In Bitlash, you'd approach it a little differently:

You'd do the usual initialization in a function named 'startup':

    function startup {pinmode(13,1);}

…and then you'd type (or send from a PC side program):

    d13=1      // to turn it on, and 
    d13=0      // to turn it off

Once you've got it under command line control, Commander can put it on the web.

-br

Brilliant!

Thanks a lot guys for the quick replies; getting there already ... really helpful.

It's my mistake but I forget to mention that I intend this to work autonomously. This means that basically it should connect wirelessly to a local wireless router (the password will be configured by the end user on the setup phase - software - I think this is the best approach but if you have other ideas that you could suggest you are most welcome to do so - you are the expert :slight_smile: ). Afterwards the board should connect (let's say every 5 hours) to the router and request data via an API. Depending on the API response it should light up an LED (or not).

So based on this approach I think I can say that the connection between the Arduino Mini and wireless router should be made via WiFi (so we can drop the bluetooth or IR components in this case). If this is the case, which WiFi components/shield would you use? If you could drop me a link even better.

Also, I've managed to create already (using my Arduino Uno board) a connection between the board and PC. I've also created a really simple user interface in Visual Basic just to test this. Right now I have a small application on my PC trough which I can turn ON/OFF the LEDs from my board. Maybe it's not related but had to try this so I can taste the software part and how things work.

Again, it's a barebone idea, I try not to complicate it way too much so I can learn while doing this :slight_smile:

billroy:
One way to skin that cat would be to attach a bluetooth serial adapter to the mini, rendering it portable/wireless, and control it over bluetooth serial from the PC side with something like Bitlash Commander: GitHub - billroy/bitlash-commander: Web-based dashboard builder for Arduino. -- which also exposes a web control panel interface so you can switch your LED on and off in the browser.

Mind the 3.3V vs. 5V supply and signal issues when you buy stuff to go with the Mini, especially if you are thinking about going with a shield for the regular Arduino form factor and some ad-hoc wiring.

Good luck with your project,

-br

Just downloaded the Bitlash Commander ... Wanted to say that it's really awesome; an excellent piece of work, grats! Will definitely play around a bit with this.

Just found this http://www.robotshop.com/eu/redback-arduino-wifi-microcontroller.html Any thoughts? Have you got any experience with this board?

Cheers!

Thanks for your kind words about Commander.

That wi-fi part is interesting. The data sheet doesn't specify an operating voltage, which is at least a little bit curious. If you have a 3.3V mini, you need to be careful around 5V hardware.

-br

billroy:
Thanks for your kind words about Commander.

That wi-fi part is interesting. The data sheet doesn't specify an operating voltage, which is at least a little bit curious. If you have a 3.3V mini, you need to be careful around 5V hardware.

-br

Good point, couldn't find the operating voltage ... will try to find out more and will let you know as well.