Go Down

Topic: Program run switch (Read 2985 times) previous topic - next topic

Aklem

Maby a switch defined by the bootloader will be able to control when the program is run and is not? When the switch it off the program dosent run but you can program it sith the ide. Therefore when testing if you have the arduino mounted and some servos set to run continuosly then when you try to program it, it dosent start moving, (trust me bad expieriences) my temporary solution was to use a seporate servo power supply and wire it to a switch. But that wont work for everything.

RaygunGothic

I'm sorry, I'm not quite sure I understand. How will the effect of this differ from just making the main loop wait for a button press to get started?

Aklem

Because the design will be on the pcb... Without having to solder it, personal expierience, such as a robot that im programming (that i built) i forgot a switch and had to hold it up in the air while progrAmming it
the freeduino from sparjfun has a power swutch...

trialex

Arduino's are designed for prototyping.

The Arduino team had intended that you prototype your design on the Arduino board, then when it's ready to go move the IC to a more permanent application board. This would presumably have an on/off switch.

Aklem

you don't get it....

for prototyping it is way easier to have something built in.
you probably haven't experienced it to the fullest...
i need to wait till someone who knows what im talking about to reply
sorry :(

CaptainObvious

Well, when making a prototype board such as the Arduino.. you gotta realize they're thinking more of a "general" population when they implement pins, buttons.. etc..

Doesn't seem like what you're trying to explain would have a whole lot of uses.. but then again, it's not very clear what you're explaining!

From the sounds of it.. couldn't this all be done on the Software side?

Only running the program after a button is pushed.. then another button push to turn it off?

I'm sorry if this isn't the right idea.. just confused on what you're explaining:D

Aklem

Yes exactly except in a switch, the only change im suggesting is that a smd or dip switch be mounted  on the side (can access it with shield on) connected to ground with pulldown resistor 5v and a io pin.

trialex

Quote
you don't get it....

for prototyping it is way easier to have something built in.
you probably haven't experienced it to the fullest...
i need to wait till someone who knows what im talking about to reply
sorry


Way to get added to my "do not help list"!

You can't have a "one-design-fits-all" as a prototyping board - it's not practical cost-wise or size-wise. Compromises are always made.

Andrew

Actually a built in push-button might not be a bad idea. After all, we have a built in LED on pin 13 for output, why not a built in button on pin 12 for input? It would mean people could run something a little more interesting than Blink without any external hardware at all.

Andrew

Aklem

If your just connecting directly to the pins its usefull to have a switch, for running the program, or somthing else. EVEN THE SPARKFUN PROTOSHIELD HAS ONE

Mike Murdock

Couldn't this be accomplished by changing the bootloader and avrdude?  You could add a "do not run after download" flag to the download data stream sent by avrdude and received by the bootloader.

-Mike

Aklem

All im suggesting is a swith and pull down resisor be added to pin **.
you do the code...

westfw

Which IO pin do you want to give up so that you can have this switch instead?

retrolefty

I think the original Arduino design made a decent compromise between being general purpose while self sufficient at the same time. Sure an extra push button would have been useful for some but it didn't make the cut.

The pin 13 LED is very useful to tell if the board is functional by uploading a blink sketch without having to wire anything else up. So it's a quick checkout for the initial IDE installation and set-up (board and comm# selection correct) for someone just starting out.

Keep in mind the ease of adding either a store bought or DIY proto-shield that can contain any 'extra' component items you want.

Lefty

westfw

Quote
a decent compromise

Indeed.  I've been playing with freescale's Tower eval setup for their MCF51CN128.  Trying to design a PCB "intermediate" board to connect it to arduino shields, in fact.  Despite the fact that this is an 80pin chip, it's been really depressing how many of the "obvious" pins are already "used up" by the demo stuff included on he eval board.  (The Tower Board/setup has a lot of peripherals built in.  Sorta the opposite extreme from arduino.
switches, LEDs, ethernet, switches, accelerometer, potentiometer...)
The Atmel "butterfly" has similar problem...

Go Up