Show Posts
Pages: [1]
1  Using Arduino / Motors, Mechanics, and Power / How does SERVO work? on: January 22, 2013, 10:51:06 am
Interestingly, arduino documentation to servo library tells us that servo data wire can be connected to any pin.
Somewhere back in my skull information is stored that servo is driven by PWM,using pulse width as a mean how to tell angle to servo.Is that right?

If servo can be driven by no-PWM pin,mean that arduino tells to the servo new position,wait upon servo movement is completed and subsequently executes following code?
If so,after servo movement completion,can servo keep position (against spring for instance) even if void loop() does not pass thru servo.write command very soon?

It simply does not take much sense...

My project is very timing dependent and waiting to end of servo movement would completely disrupt it.

2  Using Arduino / Programming Questions / How to compare arrays on: May 04, 2011, 03:46:53 pm
I need to compare array to something else.Essential idea is following:
char key[7]="London";

void setup(){
  pinMode(13, OUTPUT);

void loop(){
  digitalWrite(13, LOW);
    digitalWrite(13, HIGH);

Hoewever this doesn't work.Obvious solution would be to compare array bit after bit,but I supposse that something like this must be possible to do in some elegant way...:-)
Sorry for my bad English.
3  Using Arduino / Installation & Troubleshooting / Re: Uploading sketch to homemade arduino on: April 21, 2011, 06:47:13 am
The odds are stacked against you trying to use a 12 Mhz resonator. The serial communication driven by the bootloader is dependant on the clock frequency of the 328. To get it to work at 12 Mhz, you'd need to reprogram the bootloader.  The chip will happily run at 12 Mhz, but you can't expect timing critical operations like serial to work without recoding the bootloader. 

Thanks for this idea-I replaced resonator with 16MHz and it works fine.:-)
4  Using Arduino / Installation & Troubleshooting / Re: Uploading sketch to homemade arduino on: April 19, 2011, 01:57:43 am

Have you installed a bootloader on your homemade version?

I tried to use:
1) Chip from my UNO board.
2) Chip supplied by vendor

Both of them worked,if sketch was uploaded in my UNO board and subsequently used in homemade version,but neither of them uploaded sketch thru FTDI
5  Using Arduino / Installation & Troubleshooting / Uploading sketch to homemade arduino on: April 18, 2011, 06:01:53 pm
I am trying to build my own Arduino.
I am following this tutorial:
There are only 2 notable differences:
1) I use 12 MHz resonator.
2)Instead of FTDI cable I use Sparkfun FTDI Basic Breakout - 5V.

I am able to run my homemade Arduino if sketch is uploaded on my UNO,hovewer I am not able to upload any sketch to this chip using FTDI Breakout.
Is there any difference if I use FTDI Breakout  instead to FTDI cable?
Is there any tutorial available?
6  Using Arduino / Installation & Troubleshooting / Re: A new chip in UNO and Arduino does not work on: April 18, 2011, 05:20:51 pm
When I changed board to Duemilanove,it uploaded my sketch.
Thanks a lot.
7  Using Arduino / Installation & Troubleshooting / Re: A new chip in UNO and Arduino does not work on: April 18, 2011, 05:12:28 pm
Message is :
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
8  Using Arduino / Installation & Troubleshooting / A new chip in UNO and Arduino does not work on: April 18, 2011, 05:05:57 pm
I bought ATmega328 with Arduino Bootloader
I assumed that if I will insert this chip in Arduino UNO,I will be able to work as usual.
Unfortunatelly,I am unable to upload sketch,but if I insert old chip (=supplied with UNO),Arduino operates again normally.
Where is a problem?

Sorry for my bad English.
9  Using Arduino / Programming Questions / How to terminate setup() using interrupt? on: February 21, 2011, 09:21:28 pm
I would like to use interrupt to terminate setup() and follow to proceed loop() indefinitely.
However   attachInterrupt(1, loop, FALLING); does not work,because  it triggers loop() only once.
I tried to have a separate interrupt function,like:
Boolean interruptSetup=false
Void setup(){
attachInterrupt(1, interruptfunction, FALLING);
//my other setup code,including
//all other setup code depends on conditions interruptSetup==false,which forces  everything to terminate as quicky as possible to loop,if interruptSetup is true.
Void interruptfunction(){
Void loop(){
However,problem is in long delay in setup() and  assigment interruptSetup=true; in interruptfunction().Due to 30second delay,it is almost sure that interrupt will be triggered  during delay().As long as interruptfunction() contains assignment interruptSetup=true; interrupt wont  interrupt delay, instead it will only assign value to interruptSetup  and wait until delay finishes.
I suppose,that usually this does not cause a problem,because delay intervals typically use to be really short,but I can’t obviously wait 30 seconds to get response which I expect immediately.
Any ideas how to fix this?
Pages: [1]