Recent Posts

Pages: [1] 2 3 ... 10
1
Great! A Karma point for persistence.  :)
2
Bar Sport / Re: Arduino in Aircraft Cabin
Last post by TomGeorge - Today at 07:11 am
Do you have the list of forbidden items?

I would be surprised if there is a problem but the only way to get an official answer is to ask the airport security folks.

...R
Yes, I would agree, let them know what you have before they discover it and make the wrong assumptions.
I will watch the NBC news tonight to see if they did...
Tom.... :) :) :)
3
!= means "not equals to"

So, evidently the old state of the switch was saved in PreviousOnOffSwitchState, and now it's looking to see if the current state, onOffSwitchState, differs from that.

If it does differ, then we look to see in what direction. (Since a change could be high to low or low to high, and knowing merely that it's changed is often not enough.)

So the next if, which you will see is inside the first if, so we know it's changed, looks to see if the current state is high, where presumably a high means pressed. If it IS high, then change the value of the motorEnabled value to its opposite. (! means "not", or opposite)

Boils down to if the button has become pressed, toggle the motor.

Note what I said there: has become pressed, not is pressed. It looks to see first if the switch changed, then to see if it's high. It can only get to the point for looking for the high if it changed, which means it must have been low,ie it's a NEW press. (Else, holding it down wold toggle it forever.)

edit: I know I'm saying what sterretje said, but I had typed it all out while he posted, so thought wth, may as well post too ;)



4
Project Guidance / Re: 7 Arduinos to Raspberry Pi...
Last post by crisreorc - Today at 07:05 am
Aa sorry, yes I have a usb hub shield with 7 usb ports. But is possible read all Arduino a data with raspberry by serial??
5
It checks if the state of the switch/button chanģed. If so, it checks if the new state is high. And if so, if will toggle motorEnabled; if motorEnabled was true ( or high) it will become false (or low), and vice versa.
6
Project Guidance / Re: Pwm lighting project possi...
Last post by TomGeorge - Today at 07:01 am
What was wrong with what Wawa gave you about saving settings to EEPROM in reply #1?

Arduino Uno, Nano, and Minis all have 1024 bytes of EEPROM good for at least 100,000 writes.
How many times a day on average will your project save settings?

I agree, have a "SAVE" button and you won't need to program a power shut down sequence.
Sorry did not see the reference to 34 LEDs
Tom... :)
7
Project Guidance / Re: 7 Arduinos to Raspberry Pi...
Last post by sterretje - Today at 06:55 am
A Pi does not have enough USB ports ;)

You will need one or more powered  USB hubs.
8
Project Guidance / how to send a .txt file to ard...
Last post by r94hamid - Today at 06:54 am
Hello everyone,
I've been trying to send a txt file to my arduino via bluetooth for some time and no luck!
my txt file contains a few numbers like 1,5,3,8,3,5,1,...... and I need these numbers to be sent to arduino UNO one by one periodically (for example every 0.5 second ).

does anyone know how to do that ?

I would really appreciate it.
9
Hi there,

Can someone please explain what this piece of code does?

Code: [Select]
if (onOffSwitchState != PreviousOnOffSwitchState){
  if (onOffSwitchState == HIGH){
     motorEnabled = !motorEnabled;
  }
}

These are all variables that are what their names imply.
And the OnOffSwitchState variable is set by a push button.

Any help would be greatly appreciated,
shmily
10
Bad soldering is more likely than bad chip. Inspect the board using a magnifying glass. Put pressure on the two resistors while running the loopback test; if it works, you've found where the bad solder is. Same for the rx/tx pins on the 16u2.

Or ask for a new one from the seller :D
Pages: [1] 2 3 ... 10