DIIGIIT ROBOTICS FORUM

You are not logged in.

#1 2014-06-13 17:41:29

MaximeT
Member
Registered: 2014-06-10
Posts: 4

Arduino Uno projects

Hi all,

I'm beginner with Arduino. I've bought an Arduino Uno on your website store with presence sensor (to make an intrusion alarm), light dependance resistor.
I wanted to know if someone here has ideas to make good (and cool!) projects with Arduino Uno. I find the Arduino concept really cool.

Thanks!

Max

PS : Sorry for my english smile

Offline

#2 2014-06-15 21:49:26

Diigiit Sales
Member
Registered: 2014-05-26
Posts: 97

Re: Arduino Uno projects

Hello Maxime,

There is endless examples of cool things you can do with the Arduino Uno. Since Arduino is pretty simple to use, especially with the Arduino IDE, you don't have to be a programmer to test your own idea.

The LDR sensor (Light Detector Resistor) is simple and cheap sensor that can be used to detect ambient light. It can be used, for instance, to start a device (like a light) at night. It will react to direct light. I am not sure this sensor would be reliable for intrusion detection unless you are in a dark room and you switch the light on or if you light up the photoresistor with a flashlight. In any other case, I am pretty sure you won't detect the intruder.

Offline

#3 2014-07-10 03:20:04

Odysseus
n10b
Registered: 2014-07-08
Posts: 23

Re: Arduino Uno projects

There is nothing you can do with an Arduino Uno. You need at least an Arduino Mega to create your own 3D printer smile

Offline

#4 2014-07-11 10:49:30

PatrickC
Moderator
Registered: 2014-07-10
Posts: 8

Re: Arduino Uno projects

To Maxime and all,

Here is what I recently tried with an Arduino UNO, a servo motor and one LDR (light-dependent resistor), it worked well !

What you need:

  • 1 Servo

  • 1 Photocell (LDR)

  • 1 1.8kΩ Resistor

  • Arduino Uno

  • Protoboard

  • Some wires

From Arduino to breadboard; plug 5V to red rail and GND to blue rail...
Hook up servo and LDR to Arduino and power to breadboard:
Servo: Red to 5V, Black to GND on breadboard and yellow to PIN 9 on Arduino.
LDR: One pin to 5v and the other pin of the LDR to 1.8k resistor and hook to PIN A0 (analog 0 on Arduino) it has to be on same line of breadboard. Then plug the other end of the resistor (the 1.8k resistor) to GND.

Here is a working code:

#include <Servo.h>

Servo myservo;        // Create a servo instance
int pos = 0;          // Initial position of the servo
const int ldr = A0;    // Photocell pin
int val = 0;          // Light value

void setup(){
   myservo.attach(9);       // Attaches the servo on pin 9 to the servo object
   pinMode(ldr, INPUT);     // Initialize the photocell pin as an input
   Serial.begin(9600);      // Initialize serial communication (To see the values)
}

void loop(){
   val = analogRead(ldr);             // Read the value directly from the Arduino
   val = map(val, 0, 255, 0, 100);    // Map the values from 0 - 100
   Serial.println(val);               // Prints the values in the serial monitor
   switch(val){
      case 100:
         myservo.write(0);            // Remains in 0°
         break;
      case 50:
         myservo.write(65);           // Moves to 65°
         break;
      case 10:
         myservo.write(160);          // Moves to 160°
         break;
      case 0:
         myservo.write(180);          // Moves to 180°
         break;
   }
}

Have fun !

Last edited by PatrickC (2014-07-11 19:28:37)

Offline

#5 2014-08-04 20:59:34

MaximeT
Member
Registered: 2014-06-10
Posts: 4

Re: Arduino Uno projects

Firstly, sorry for the response time, I returned from a long journey.

Thank you, I'll try it very soon. I'll have time to devote myself to it.

Max

Offline

#6 2014-08-21 11:25:51

PatrickC
Moderator
Registered: 2014-07-10
Posts: 8

Re: Arduino Uno projects

Salut Maxime,

So, how did it go ? Did you tried something ? Just let me know if you have questions.

Offline

#7 2014-08-22 13:30:00

MaximeT
Member
Registered: 2014-06-10
Posts: 4

Re: Arduino Uno projects

Hi Patrick,

I don't have servo for the moment. I will try your example when I receive my servo.
I have make just some examples with Arduino this last days and I confess my mind is somewhere else smile I think about a video game station embedded in a coffee table, with a RaspBerry Pi (to playing PacMan, or Pong for example when I make partys with friends). It's possible as I open a new topic about it, in the RaspBerry section...

Max

Last edited by MaximeT (2014-08-22 13:30:34)

Offline

#8 2014-12-24 18:12:13

Incendie
Member
Registered: 2014-12-16
Posts: 7

Re: Arduino Uno projects

If you ever get that game station started/completed I would love to hear about the process. Never got to work with a RaspBerry Pi but I heard some good things about it

Offline

Board footer