Show Posts
Pages: 1 ... 26 27 [28] 29 30 ... 80
406  Using Arduino / Sensors / Re: cant get clock to work on: August 03, 2013, 04:13:37 am
I have a different library that you can try with a bunch of test code. See the repository address in my signature below.
407  Using Arduino / Programming Questions / Re: Need help inverting an action upon recieving same input on: August 01, 2013, 07:31:19 am
Your logic is not as you intended

Code:
  if(results.value == 0xFF22DD)
  {
    if  (digitalRead(led)==LOW)
    {
      delay(5);
      digitalWrite(led, HIGH);
      delay(5); 
    }
    else
    {
      digitalWrite(led,LOW);
      delay(5);
    }
}

It really helps if you get into the habit of putting brackets and indentations in the right way. The flow of the program becomes much clearer.
408  Using Arduino / Programming Questions / Re: Need help inverting an action upon recieving same input on: August 01, 2013, 06:23:28 am
Just tried this code

Code:
void setup()
{
  pinMode(13,OUTPUT);
}

void loop()
{
  digitalWrite(13, !digitalRead(13));
  delay(500);
}

and it does what I expect - flash a LED with a 1 second cycle.
409  Using Arduino / Programming Questions / Re: Need help inverting an action upon recieving same input on: August 01, 2013, 05:55:47 am
Have you got brackets around the new 'if' statement? This groups it under the check for the IR code.

The logic is pretty simple here so not much else to suggest. Maybe repost the modified code? Use the # button when posting to get code tags 
410  Using Arduino / Programming Questions / Re: Need help inverting an action upon recieving same input on: August 01, 2013, 05:40:02 am
You can try a longer version

if  (digitalRead(led)==HIGH)
  digitalWrite(led, LOW);
else
  digitalWrite(led,HIGH);

Serial monitor resets the board when turned on.
411  Using Arduino / Programming Questions / Re: Need help inverting an action upon revieving same input on: August 01, 2013, 05:00:42 am
digitalWrite(led, !digitalRead(led))
412  Using Arduino / Programming Questions / Re: Finding a number in a large array on: July 30, 2013, 03:18:27 am
All good advice so far but the quick- and binary- searches are designed to return the exact match for what you are looking for.

As I understand you want to find the next lowest and the next highest to the value you are looking for, so you will need to modify the algorithms presented.
413  Using Arduino / Programming Questions / Re: how to scroll text on 8x8 dot matrix on: July 30, 2013, 03:14:04 am
How do you want to scroll it? Left or Right? Do you just want to move it off the screen or rotate through?

You need to understand the << and >> operators in C - this will move the bits in a byte/word/long to the left or right by the specified number of positions. Scrolling is just moving bits the way your characters are defined.
414  Using Arduino / Sensors / Re: i want to check the time on: July 29, 2013, 02:11:00 am
Look at your watch?
415  Using Arduino / Audio / Re: Serial <--> MIDI not always same result on: July 27, 2013, 04:00:47 am
Contact bounce could be an issue but I would expect you see multiple messages in the printing.

I don't have any experience with your computer based software, so can't help there.
416  Using Arduino / Audio / Re: Serial <--> MIDI not always same result on: July 27, 2013, 12:23:11 am
Instead of send the midi messages out the serial port, try printing them out to the serial monitor of the arduino. This will eliminate the comms line and beyond as a source of errors. If the messages are right at that pint, then you know where to look. If they are not right, then it is all in the Arduino code ...
417  Using Arduino / Programming Questions / Re: Question about hex codes on: July 27, 2013, 12:05:06 am
Looks like the current sketch takes its input from the serial monitor. So you need to cut and paste the data to the serial monitor input section at the top of the window.

If you want to hard code it into the sketch then you need to modify the sketch to be triggered by something like a digital input instead of reading the data from the serial line. Then just send the array of data the way that it would be handled at the moment.
418  Using Arduino / Programming Questions / Re: Question about hex codes on: July 25, 2013, 10:30:06 pm
Without knowing more about the data it is not clear how you would be able to compress this large amount into 32 bits.

What are you actually trying to do?
419  Using Arduino / Displays / Re: LED board messaging on: July 24, 2013, 11:58:30 pm
I am assuming that the board is a commercial product and has a manual that you will be able to read.

In order to control the board you will need to find the communications port (socket somewhere) and a definition of the messages that you can send to the board to control it. Once you have that then you can write the software.

Otherwise you will need to reverse-engineer the communications protocol, which may be more complex than you may want to tackle at this stage.
420  Using Arduino / Storage / Re: Can anyone provide me eagle file of arduino uno with sd card shield? on: July 21, 2013, 08:23:04 pm
If you buy one of the ready made SD card units (like this one on eBay http://www.ebay.com.au/itm/Perfect-SD-Card-Module-Slot-Socket-Reader-For-Arduino-ARM-MCU-Read-And-Write-/350835892546?pt=AU_Gadgets&hash=item51af72e142), then mounting it on a Uno size protoype board is so striaghtforward that I don't think that you will find an electrical schematic is needed - you simply hard wire the same links you would use if you were putting it onto a breadboard.
Pages: 1 ... 26 27 [28] 29 30 ... 80