Show Posts
Pages: 1 2 3 [4] 5 6 ... 33
46  Community / Exhibition / Gallery / Re: [info] PaperRobot: simple homemade robot with Arduino on: November 12, 2011, 03:26:53 pm
google can do a translation for us!

It does look like a really cool robot, though!

47  Using Arduino / Audio / Re: Read and Play MIDI file in arduino on: November 11, 2011, 05:00:02 pm
Although you cannot generate any quality audio with the UNO alone, it is possible to use something else - the midi shield!

That should sort out the issues of bad sound quality.

48  Using Arduino / Project Guidance / Re: simplest gps clock on: November 11, 2011, 04:49:17 pm
I've played with a GPS module before, using this code:

char data[300];
char GPSsignature[7] = "$GPRMC";
int comma[13];
int ledPin = 13;                  // LED test pin
int GPSbyte;
int count;
int correctData;

void setup() {
  pinMode(ledPin, OUTPUT);       // Initialize LED pin

void loop() {
  digitalWrite(ledPin, HIGH);

  if (Serial.available() > 0){;         // Read a byte of the serial port
    data[count]=GPSbyte;        // If there is serial port data, it is put in the array

    if (GPSbyte==13){            // If the received byte is = to 13, end of transmission
      digitalWrite(ledPin, LOW);

      for (int i=1;i<7;i++){     // Verifies if the received command starts with $GPR
        if (data[i]!=GPSsignature[i-1])

      if(correctData){               // If yes, countinue and process the data
        for (int i=0;i<300;i++){
          if (data[i]==','){    // check for the position of the  "," separator
          if (data[i]=='*'){    // ... and the "*"
          count = 0;

          for (int i=0;i<8;i++){
            case 0 : Serial.print("Time in UTC (HhMmSs): "); break;
            case 1 : Serial.print("Status (A=OK,V=!OK): "); break;
            case 2 : Serial.print("Latitude: "); break;
            case 3 : Serial.print("Direction (N/S): "); break;
            case 4 : Serial.print("Longitude: "); break;
            case 5 : Serial.print("Direction (E/W): "); break;
            case 6 : Serial.print("Velocity in knots: "); break;
            case 7 : Serial.print("Heading in degrees: "); break;
            case 8 : Serial.print("Date UTC (DdMmAa): "); break;

           for (int j=comma[i];j<(comma[i+1]-1);j++){
  else delay(100);

It takes in all the data from the GPS via the serial port, then extrancs the data and prints out each individual part. If you wanted, you could ignore the lat,lon,altitude,n/s,e/w bits and just look at the time, which will not be too hard.
I managed to find a decent GPS module for £20, but I cannot find it in the shop I bought it from, so no links... It had good accuracy though, quick to find sattelites, and worked indoors!

49  Using Arduino / Programming Questions / Re: Has anyone used AVR Library for sleep mode ? on: November 05, 2011, 03:35:10 pm
Just found this on the playground page:

Events on the USART (the serial port) will also wake up the Arduino. In order for this to work, the Arduino must be in POWER_MODE_IDLE, the only power mode that doesn't disable the USART. Although this mode doesn't give great power savings you can use the functions provided in avr/power.h ( power_adc_disable(),power_spi_disable(),power_timer0_disable(), power_timer1_disable(),power_timer2_disable(),power_twi_disable()) to disable other hardware modules to achieve greater power savings. See this link for example code.

So anything other than POWER_MODE_IDLE will sto the UART - and serial communication.

50  Using Arduino / Programming Questions / Re: Has anyone used AVR Library for sleep mode ? on: November 05, 2011, 03:32:54 pm
The only documentation I can find for setting the arduino to sleep is in the playground: I have absolutely no idea if you can still talk over serial with it when you send it to sleep, but some simple experiments should answer the question...

51  Using Arduino / Programming Questions / Re: Library Error on: November 03, 2011, 04:17:35 pm
Yes, that is the only error I get, but I get it like ten times.

Added to what AWOL said, you need to create an instance of that object, as shown in his post. What this does is turns the class from a list of instructions to an object. (Syntax: Class-name object-name). You can then access variables and functions in the class by going class-name.variable-or-function. If you used the initialiser AWOL said, that would be, or similar.

52  Using Arduino / Programming Questions / Re: Library Error on: November 03, 2011, 03:50:42 pm
I was trying to write a library for a seven segment display when i got the error: "Expected unqualified-id before '.' token".
Was this all the error message you got? Whenever I write a library I get an extensive list of error messages that I slowly have to fix. These always say something along the lines of "In file Segment.cpp:". This will help to find the error, so please copy the whole message.

53  Using Arduino / Programming Questions / Re: Any way to program to play multiple tones? on: November 01, 2011, 04:29:02 pm
If you want to play more than one note at a time, you need a piano.
smiley-grin smiley-lol smiley-grin

So I see I can play sounds by connecting force sensitive resistors. But how can I play multiple tons by programming them in?
I assume you're refering to this example code?

void setup() {
  // initialize serial communications (for debugging only):

void loop() {
  // read the sensor:
  int sensorReading = analogRead(A0);
  // print the sensor reading so you know its range
  // map the pitch to the range of the analog input.
  // change the minimum and maximum input numbers below
  // depending on the range your sensor's giving:
  int thisPitch = map(sensorReading, 400, 1000, 100, 1000);

  // play the pitch:
  tone(9, thisPitch, 10);


Notice the lines I highlighted - they are the lines that change the pitch. If you program the tomes in you will want to change these lines. Check out this example:

54  Using Arduino / Project Guidance / Re: I am trying to find plans for a simple millivoltmeter on: November 01, 2011, 02:36:08 pm
Diodes would ensure that you are reading dc

BUT diodes have a voltage drop over their terminals. The actual reading will be different to the input voltage, so there will be no accuracy to it... And another problem: diodes have to have a certain voltage over them before they will conduct. If you are wanting to measure a few millivolts, the diode will stop any current getting through and there will be no (meaninfgul) reading at all.

¬The arduino cannot measure AC
¬A diode will loose any accuracy
¬You will not be able to measure anything below a certain voltage.

Time for some serious thinking!
55  Using Arduino / Project Guidance / Re: I am trying to find plans for a simple millivoltmeter on: November 01, 2011, 12:16:19 pm
I assume you want to use the arduino to measure the voltage then save the data? It is possible to measure in millivolts if you apply a voltage to aref and use the analog reference function. Using the SD library you can save the data to an SD card. For hardware, you would need to know what the voltage range was. If it exceeds 5V or the voltage on aref, your arduino is dead. Otherwise, just connect a probe to the analog input. There is also the problem of resolution - using 1V on aref will give a resolution of ~1mv. Not a lot... - analog reference - analog read - the SD library

56  Using Arduino / Motors, Mechanics, and Power / Re: Voltage Regulator for RC Car and Arduino on: October 20, 2011, 03:31:59 pm
To help choose a regulator you need to provide some details:
  • What voltage do you need (output)?
  • What voltage will you use (supply)?
  • What components will you use and how much current do they draw?
  • Are you using big, powerful motors that will suck up a lot of current, or smaller ones that take less?

Once you know the supply voltage, needed voltage, current draw, etc, then you can choose the regulator you need. Do you even need a regulator though? If it is possible to get it to work without one, it may just be easier....

57  Using Arduino / Microcontrollers / Re: Caps on and around ICs on: October 19, 2011, 03:54:53 pm
how does one go about figuring out what size caps to use when trying to build a circuit that has an Atmel IC on it
For a standalone arduino? We go to a standalone arduino page and build that circuit! smiley-grin

58  Using Arduino / Project Guidance / Re: Tracking device with arduino on: October 17, 2011, 04:02:12 pm
But in most cases, you wouldn't worry about where your child gets to when indoors. Large hotels and buildings on the other hand...
59  Using Arduino / Project Guidance / Re: Tracking device with arduino on: October 17, 2011, 03:59:01 pm
How about starting with something more reasonable.

I agree this would be fairly difficult, but definately do-able. There are plenty of GPS modules available. Connect one up to the arduino, plus a GSM shield and sim card. When the GPS reads a large distance from home (home location - current location. If distance > threshold), get the GSM shield to send a text to the parents. This would mean a control panel on the product to allow the parents to enter the threshold, phone number and home location, which may be awkward. Possible, yes; easy? No.
Xbees (supposedly) give a signal stregnth indicator. Make the tracker send a GPS location (or a random number). If the signal stregnth is low, the receiver can alert the parent. If you do send GPS data, it can also tell them where. Possible, yes; easy? Easier than the previous idea...

60  Using Arduino / Project Guidance / Re: Switching on/off device with toggle buttons not a physical switch on: October 16, 2011, 02:28:56 pm
So is there a word for this kind of switching on and off circuit?  Just so i know what to google...
Self-switching-off circuit? Circuit that turns it's self off? A google search for one of those should return something.

I also was kicking around using my RFID tag reader to easily arm/disarm the device..
If you can do it with a button, you can do it with RFID (assuming you can connect the reader to the arduino).

Is this possible?  I suspect doing so the device would truly never power off?
It could be possible... Connect up a relay to provide power to the circuit. Shorting the relay contacts will switch on the device. It will then set a digital pin to high, keeping the relay contacts closed. When the correct combination is entered, the digital pin goes low, the relay opens and the device is switched off. This method relies on you being able to turn it back on though.

In the setup function, set the digital pin connected to the tranistor high. REMEMBER TO INCLUDE A BASE RESISTOR THOUGH! When the correct button sequence is entered, set the pin to low and it will power off. To turn it back on, hold the on switch until the setup function is completed.

Pages: 1 2 3 [4] 5 6 ... 33