Show Posts
Pages: 1 ... 72 73 [74] 75 76 ... 321
1096  Using Arduino / Programming Questions / Re: Delay Function on: June 25, 2014, 01:08:53 am
You might want to think of implementing Blink Without Delay else your processor will be tied up for 25 minutes unable to do anything else.
1097  Using Arduino / Displays / Re: LCD keypad shield (dfrobot) doesn't work on: June 24, 2014, 10:56:55 am
My DFR LCD like yours also fires up  with the black blocks. But I uploaded your code and it displays "hello, world!" on the top line with the seconds underneath.

So it's not your code.....
1098  Using Arduino / Displays / Note to Adafruit AF931 128x32 oled users on: June 24, 2014, 09:11:19 am
If you're short of Arduino pins, AF support says you can dispense with hooking up the RST line on the panel.

1099  Using Arduino / Sensors / Re: How to use IR Sensors on Arduino Uno on: June 24, 2014, 08:41:01 am
Have a look at the various QTR sensors at Pololu. They are tailor made for line following applications; there's a library and sample code.
1100  Using Arduino / Programming Questions / Re: Delay() or Not Delay(), that is the question. on: June 24, 2014, 08:18:41 am
Can someone point me to a reference to this "BWD" approach?   I'm a newbie.


Sorry, my bad for the acronym. It's Blink Without Delay, which you can see here or load from the IDE File > Examples > 2.Digital

Edited my opening post to spell it out....
1101  Using Arduino / Project Guidance / Re: LCD temperature display with IR control. Trouble with PWM on pin 3. on: June 24, 2014, 06:18:59 am

i will look at the library and edit it.


I have a suspicion that will be more easily said than done....
1102  Using Arduino / Programming Questions / Re: Delay() or Not Delay(), that is the question. on: June 24, 2014, 06:13:13 am
Quote
Discuss....
Not here, though. This isn't a programming question. This should be in Bar Sport or somewhere else.

Fair enough, although I thought it better than having a philosophical discussion in the other thread....
1103  Using Arduino / Project Guidance / Re: LCD temperature display with IR control. Trouble with PWM on pin 3. on: June 24, 2014, 06:06:14 am
I got a bit confused in the wordy answers there, so I'm not sure if the question is actually answered.

Bottom line is that the IR library disables the use of PWM on pin 3, simple as that. I can't remember if that's documented anywhere though.

EDIT: Here's a clue from Ken Shirriff's Blog:

Quote
At the low level, enableIROut sets up the timer for PWM output on pin 3 at the proper frequency.
1104  Using Arduino / Programming Questions / Delay() or Not Delay(), that is the question. on: June 24, 2014, 06:00:50 am
Hi everyone,

I'm an adult educator by default and then post-grad study, so I'm always pondering the desirability of including stuff in training and if so, to what depth how soon. One of the first programming courses I went on, adopted a silo approach and taught each command in depth although a working program needed width (ie knowledge of many commands) before depth (a knowledge of each command's esoteric parameters).  Since then, it's been interesting for me to see how curriculum requirements are a)defined and then b) sequenced into the material.

This thread raises the issue of the desirability of ever (never?) learning the use of delay. If it is desirable to learn it, should it go before the Blink Without Delay (BWD) millis() approach is learned, or what?

I suppose one school of thought is never to use delay, although a 5ms delay to let an eeprom write finish is probably a legitimate use of delay(). If your program does literally nothing but flash an LED for 10 seconds every hour, is delay() legitimate then, or is it just being lazy? It would certainly be difficult to undo that if the program requirements ever changed.

If delay() is learned first, is there a risk of the "with delay()" mindset getting too entrenched so that when it is definitely inappropriate to use it, it's difficult to learn the BWD / state machine approach?

Discuss....

Edit... a bit of background. The delay() function halts all processor activity while the delay is, well, delaying. So if you delay for 10 seconds after switching an led on, to switch it off again, your code can do nothing else. Using millis() however, the program would switch the led on, and carry on doing stuff. Among the stuff it will do, is look every-now-and-then to see if 10 seconds has expired. If not, carry on with other stuff. If it has, turn the led off, then carry on with other stuff.
1105  Topics / Education and Teaching / Re: Tutorials for beginner on: June 24, 2014, 05:39:59 am
Is there any video cours? Maybe on youtube, any official canal?

As far as I know there is no official video, but I'm sure you'll find some if you search. One video you should watch, although maybe not right at the start of your learning, is this one on state machines (blink without delay).

Also quite a lot on Instructables.
1106  Using Arduino / Project Guidance / Re: how can i controlling direction of servo motor? on: June 24, 2014, 04:49:57 am
zoomkat will be along shortly with some demo code.

Have to allow for the time difference though.

Just to clarify, abdelrahman92, you have a continuous rotation servo, not a "normal" servo? Or is it one of each?

 (Jfyi, some members here are of the opinion that once you change a servo for continuous rotation, it should no longer be called a servo.)
1107  Using Arduino / Project Guidance / Re: Temperature sensor based respiratory monitoring system.....need help! on: June 24, 2014, 01:29:41 am
Reply #1 asked that you use the code tag # above the  smiley-sweat smiley to format your code to make it readable....

Right now the code in Reply #6 is crazy since a) it changes to italics in the middle (that will be due to using i as an index in an array so the browser sees [ i ] with no spaces and switches on italics and b) there's a smiley  smiley-cool at the bottom because the browser saw 8 ) with no space and thought that was a smiley.

So, please go back to that reply, click Modify and then select the code and hit the # above the  smiley-sweat
1108  Using Arduino / Programming Questions / Re: Very Basic Button Question - Pull up or down? on: June 23, 2014, 11:18:05 pm
The internal resistors do indeed save components as David says, but they could have been pull-DOWNs just as easily at design. Have a look at Reply#8 in this thread which gives a rationale for preferring pull-UPs.

Also the logic is easier to remember: when the button is "low" physically, ie pushed in, the line goes "low" too.
1109  Using Arduino / Installation & Troubleshooting / Re: Clearing board between sketches on: June 23, 2014, 02:40:49 pm
Using the bare minimum of code here will it either:

A write over the prev code
B be saved to the eprom as well as the other code


Hi Rik,

There's no clear or similar, hence the suggestion to upload a more or less empty sketch. Any sketch you upload, no matter how small it is, will overwrite the existing one.
1110  Using Arduino / Displays / Re: Adafruit AF931 OLED I2C address on: June 23, 2014, 11:10:04 am
Adafruit confirmed via their forum, that the 128x32 oled cannot have its address changed from 3C.
Pages: 1 ... 72 73 [74] 75 76 ... 321