Show Posts
Pages: 1 ... 44 45 [46] 47 48 ... 87
676  Using Arduino / LEDs and Multiplexing / Re: 7 SEGMENT LED, LCD 2x16, and 25 LED's on: August 19, 2012, 03:06:24 pm
I'd use some simple shift register to drive the matrix LEDs and possibly a dedicated 7Seg decoder chip for the each of the 4 7seg. These can usually cascade so you only need 4 data, latch and clock (6 pins). The shift register can cascade another 3 pin. The LCD probably already is suitably mounted on some board so it does not need a shield as such, but they tend to use 10(?) pins. In other words, not a standard shield - the layout is too special. Remember you can use the A0-A5 pins as digital output, too.
677  Community / Bar Sport / Re: Curiosity - way too cool. Sunday. on: August 09, 2012, 05:19:47 pm
Don't know.

I don't either smiley BUT, I have seen something very similar on the sides of crashcars and crashtest-dummies. Seems it is a good point to measure movement on photo/videos as it is easy to find the centre and easy to see rotation.

Otherwise it might be a "warning" label that here "there be things that rotate". important that Martians do not get injuried if they examine the rover  smiley-lol .

They may have removed them before launch (we'll see in the transmitted pictures when the time comes) and/or, in conjunction with my photo-measurment-theory, they make it easy to see (possibly for the onboard computer vision) where tha axis of rotaion is when positioning the arm.

OK, I am out of smart-ass guesses.
678  Community / Bar Sport / Re: Curiosity - way too cool. Sunday. on: August 07, 2012, 12:55:37 am
Irrelevant fact: You can download the music (.mp3) for that "7 minutes of terror video". It is stuck in my brain in an infinite loop.

On that note, the "6 vehicle configurations" and the autonomous nature of the landing, I was idly pondering; what sort of Arduino based project could one build that has the same complexity charateristics, but scaled down 1000-fold? My first though would be something like a vehicle launched from my front door, that would drive down the street (Earth-Mars transit), cross an intersection (atmospheric entry) and a smaller part of it (all that jetissoning of transport shells) enter a store and go to particular spot (determined beforehand, with measurements). All that 100% automatic with the front door launch being timed so it fits the intersection light cycle. Actual price scanning would be partially remote controlled from my home.

No I am not building it. Fantasy-ware works first time and without hidden bugs smiley but I think an interesting mind-experiment.
679  Community / Bar Sport / Re: Curiosity - way too cool. Sunday. on: August 06, 2012, 04:04:39 pm
I piped the HD TV (Ustream) from NASA on my TV screen and enjoyed the show. If it wasnt for webcasting I would have seen nothing. (not interesting enough for the general public)

AFAIK no Arduino was involved in this mission ... ?  smiley
680  Community / Bar Sport / Re: Raspberry Pi launch farce on: July 30, 2012, 06:20:09 am
By the time it arrives I'll have misplaced my marbles.
I've bookmarked this thread - lots of things to remember in another 8 weeks
It arrived today. I promptly have put it on shelf. If I have to wait so long for it, it now it's turn to wait until I have time!   smiley-twist
681  Community / Website and Forum / Re: Chatroom on the Arduino Website? on: July 26, 2012, 02:49:50 pm
Interesting JamesC4D; would you say you are part of the minority that uses both sites?

I was not saying "limiting" - I was saying "not expanding".

But, you have a point. The Chat-oholics fret at the pedastrian pace of the forum, and the forum-nerds get disturbed by the chats going off -topic... smiley I am not anti-chat per se; althogh I only rarly use them (IRC in this case)

If there already is a well functioning chat channel, then there is no need for another one to be created here.
682  Using Arduino / Programming Questions / Re: debouncing a switch during 'while' loop on: July 26, 2012, 02:10:23 pm
I'm with PaulS.

But I actually think your first attempt was better. It should be sufficient for the scenario you describe.

The debounce, even when implemented correctly, would not help. I think something else is causing the switch sensing to change. For example that you power the motor directly from the Arduino, or it is insufficently decoupled (capacitors) - the Arduino resets, and your program starts from the beginning, or just plain malfunctions.
683  Using Arduino / Programming Questions / Re: Showing year as three digits! on: July 26, 2012, 01:02:30 pm
You MUST enclose your code in the code tags (use the "#" icon when entering the code). For example: I see a smiley with sunglasses suddenly in the code instead of a digit and closing bracket. I can guess this is a 8. Also some subscript brackets get "swallowed". Note you can edit the post you have submitted.The above was edited, so now legible.

You're also missing the "#include" of the libraries you are using.
684  Community / Website and Forum / Re: Chatroom on the Arduino Website? on: July 26, 2012, 04:36:34 am

Ie. no chat room. More channels just dilutes - less people see and potentialy answer a given question.
685  Using Arduino / Programming Questions / Re: Analog In / PWM on: July 22, 2012, 01:11:36 pm
Lets make the confusion complete smiley-wink  it does not matter if you call analogRead(A3) or analogRead(3) or analogRead(17) - they all go to the same pin. (There is code in the core to cope with analog pins having "three names" - thus helping the newcommer to get stuff working)

On the digitalRead there is not much choice. It is only the number - 13. Any alias/constants you do on your own.

Meanwhile, back to the original question and confusion of the thread.

You can set "any" pin with pinMode to input or output. "Any" is in quotes as restrictions apply.(Usually you stay away from pin 0 and 1 as they are used by Serial)
You can do digitalRead, analogRead, digitalWrite, analogWrite on "any" pin. ... and there are restrictions - analogWrite will only work on the pins marked with "PWM"; analogRead will only work on analog pins.
686  Using Arduino / Programming Questions / Re: Running two loops at once (at the same time) on: July 22, 2012, 12:27:08 pm
also on,76140.html dicsussed and shown in depth
687  Using Arduino / Programming Questions / Re: leds are repeating top and bottom in pattern on: July 22, 2012, 12:25:59 pm
johnwassers expression (1<<(11-i)) is the mask - it is computed on the fly.

On a side note: It would be a long and heated debate to determine what is "more efficient" (in terms of code, memory and CPU use); shifting your mask or computing it on the fly. It does not matter. One writes the code that most clearly states what the purpose is (unless one is in a very time critical section when one possibly has to write things in a "confusing" way to get it faster).
688  Using Arduino / Programming Questions / Re: leds are repeating top and bottom in pattern on: July 21, 2012, 02:25:32 pm
Not sure what you mean by "repeats the bottom/last".

So if the pattern is LED 3 and 5 of 5 LEDs would you expect it to blink 3, 5, (going forward) and then 5, 3 (going backward) which is what the code does very well. but you want 3, 5, 3 because the 5 is at the end, you do not want it twice?

As you write, reducing your loops would not work if the numbers are 2,3 4 in the 5 Lights as it would do 2, 3, 4, 4, 3, 2 and you want to avoid doing the 4 double?.

It requires more code: you have to remember the last LED number you blinked, and then ignore it if the same number comes up again. You can code that test & skip inside your Ledpattern function.

Lastly I am worried about your construct
if ( test ) { /* empty */ } else { /*actual code*/ }
If it is temporary construct due to some debugging code now left out, OK, but change it to
if ( opposite-test ) { /*actual code*/ }
689  Using Arduino / Programming Questions / Re: Simple-yet-powerfull - Serial Command input with numbers on: July 21, 2012, 01:17:10 pm
Hi GoForSmoke - thanks for the comment, but you are reading the test the wrong way round: the while is ONLY busy while there ARE characters in the buffer. No characters, it will return at once. Likewise if the number/command is complete. At least that is the intention. And as far as I have tested, it seems to work that way. Here is my little test.
/* Test the nnnC library */

#include "nnnC.h"

void setup() {
  Serial.println("nnnC test");
void loop() {
   static char C ; static int V ; static float F ;                               
   if ( nnnC( &C, &V) ) {                           
     Serial.print("Command ");Serial.print(C);     
     Serial.print(" : ");Serial.println(V,DEC);       

// An idle LED blink-without-delay to verify nonbloking
   static unsigned long Timer = 0 ;
   static boolean OnOff = true ;
   if ( millis() - Timer > 333 ) {
     Timer = millis() ;
     digitalWrite(13,(OnOff=!OnOff)?HIGH:LOW) ;

Graynomad: thanks for the comment about brackets. Using atoi/atof and those require using a buffer (precious RAM bytes) and suddenly there is maximum inputsize (nnnC accepts a 100 digit number - it wont fit in an integer smiley but no parser or memory overflow). I have not exactly measured it, but have experienced that including the atoi/f will appreciably increase the code size.

Any/Everybody: The design is "minimalistic": It is not foolproof (like "7-5" is legal interpreted as -75) but functional enough.
690  Using Arduino / Motors, Mechanics, and Power / Re: MC433 on: July 21, 2012, 12:45:48 pm
Hi Chagrin, no problem with doing the LPT ports, with direct connection from the Arduino. According to the schematics they go directly to the motor-controller (an ATmega48) so no problems with levels/currents there. The schematic shows a pullup on the limit switches and the doc says it only needs a pulldown to ground, so they should be OK to float (of course, simple enough to set up a pullup...)

My question is about using the TWI/I2C interface. On this interface you get to talk to motor controller to set some scaling factors, which it stores in its EEPROM and retrieves/uses on powerup.

If the only purpose is to drive the steppers I would use something else - got plenty of modern stepper-drivers. But the fun-of-the-game is this MC433 board (until it gets too difficult)
Pages: 1 ... 44 45 [46] 47 48 ... 87