Show Posts
Pages: [1] 2 3 ... 30
1  General Category / General Discussion / Re: Does Arduino Uno have max 8-bit or more resolution? on: April 24, 2013, 03:22:57 pm
If you look at the datasheet, chapter 23, you can see that the ADC has a 10-bit resolution. I don't know why the tutorial calls this an "obfuscation", but the bottom line is that the range of values is from 0 to 1023, as the tutorial says. The part about ATmega's ADC having an 8-bit resolution is simply wrong.
2  Using Arduino / Networking, Protocols, and Devices / Re: [OSX] JY-MCU Bluetooth Module issues on: April 23, 2013, 09:52:04 pm
Hi, I think that on the Leonardo TX1 and RX1 should be addressed using Serial1, not Serial (which is for the Usb port).
3  Using Arduino / Installation & Troubleshooting / Re: Arduino does not work with my Macbook on: April 16, 2013, 09:08:37 pm
I can testify it can work on Snow Leopard as well: mine is SL 10.6.8  smiley-wink.
4  International / Software / Re: Due porte su ethernet on: April 16, 2013, 08:45:39 pm
In termini di numero di socket si può fare, in termini di quantità di memoria (ogni servizio ha bisogno di un buffer per la ricezione dei comandi) pure.

Però alla fine non avrai mai un vero multi-tasking, e il funzionamento dipenderà da quanto i due servizi non si intralceranno a vicenda. Quindi, niente delay(). Ma non solo, dovrai fare in modo che anche in fase di risposta da parte di un servizio resti attiva l'elaborazione delle richieste da parte dell'altro servizio. Quindi gestire dei flag (sto ricevendo di qua, sto rispondendo di là), e forse delle code. E siccome in genere le risposte sono più lunghe delle richieste è facile prevedere che la cosa diventerà piuttosto complicata.
5  Using Arduino / Installation & Troubleshooting / Re: Arduino does not work with my Macbook on: April 16, 2013, 08:07:56 pm
on your friend's Macbook you should try to upload the Blink example, so you can get feedback by looking at the blinking LED (and if you want to be really sure that the Arduino is executing your sketch you can change the duration of the two delay()s).

I notice that you are trying to upload a HelloWorld_i2c sketch; from the name I would say it's a demo of the i2c protocol, which requires a second device and some wiring. Even if the upload were successful you would probably get no visual feedback. Hence my advice of uploading Blink.

On your Macbook, the problem is that the communication between avrdude and the Arduino times out, and this usually depends on the Usb port or cable. Try changing the Usb port (also updating the selection in the Arduino IDE) and / or the Usb cable. Also disconnect any other Usb device attached to the Macbook, and disable Bluetooth. A powered Usb hub may also help, in case the Macbook is unable to power the Arduino as it should (5V and up to Corrente Disponivel). I assume that the Arduino has no wires, shields or other devices attached, except for the Usb cable.

All these actions are reversible and harmless, and may help identify the source of the problem.
6  International / Hardware / Re: Progetto di ricerca in psicoterapia usando arduino on: April 16, 2013, 06:55:47 pm
Con il fotopletismografo direi che la bilancia tra make e buy penda fortemente verso l'acquisto: vedo che in giro ci sono diversi apparecchi che già integrano queste funzioni, con tanto di software per la visualizzazione e il trasferimento dati. Non so quanto siano davvero superiori a una soluzione realizzata in proprio, ma è difficile batterli in termini di riproducibilità e confrontabilità dei risultati, per non parlare dei tempi di realizzazione, e anche queste cose contano.

Sperando naturalmente che le aziende produttrici siano presenti in Italia. Leggo sul sito di una di queste,, che hanno sospeso le attività a causa della crisi economica smiley-sad.
7  Using Arduino / Programming Questions / Re: Compile Errors on: April 16, 2013, 06:01:44 pm
register names and bit names have a numeric value inside, e.g. UCSR0A, UDRE0, where 0 is the USART number. On the Mega you have four of them, numbered 0 to 3.
8  Using Arduino / Installation & Troubleshooting / Re: Cannot Load Keywords.txt re-install processing on: April 14, 2013, 06:45:11 pm
Hi, I just got the same error (intentionally) by deleting the file libraries.txt under the Arduino program directory (on a Mac is <arduino-root>/Contents/Resources/Java/lib, on Windows I believe that 'lib' is just under the arduino root directory). So I would reinstall the Arduino IDE one more time (and check that any arduino-related paths, such as those used by the "Open/Open with" commands, point to the new installation).
9  Using Arduino / Networking, Protocols, and Devices / Re: Seeed Bluetooth Shield Usage on: April 14, 2013, 05:46:49 pm
When the BT device is idle it is not connected to the master. If the configuration allows the last paired device to connect, however, when you open a serial terminal from the master PC over bluetooth, it transparently establish the connection to the Arduino slave (it may take a few seconds). Then you should see the green LED blink once every two seconds, instead of twice a second as in idle state. When connected, every character written in the PC terminal program is sent to the Arduino, and every response from the Arduino is written to the PC terminal program.

This behavior is controlled by the STOAUT configuration parameter. It should be true (1) by default.

As far as I know, the connection is maintained only as long as the terminal program keeps it open. If you close LabView, or just disconnect it, the BT device returns idle.

10  Using Arduino / Audio / Re: MIDI: Std Serial works, but not SoftSerial on: April 13, 2013, 09:44:18 pm
Power supply? If the processor doesn't get at least 4.5V it may run at a clock speed lower than 16MHz. You may probably measure what comes out of the 5V pin and see. There are also fuses that affect the clock speed, they are usually changed through avrdude.
11  Using Arduino / Audio / Re: Need help going from Garageband Midi to Arduino Uno on: April 13, 2013, 09:34:48 pm
Hi, some problems with arrays:
int notesToShutOff[10];
int noteDurations[10];
// ...
noteDurations[10] = 40;
// ...
for(int x=2; x<=10; x++){
  if(notesToShutOff[x] + noteDurations[x] < milliseconds)
// ...
if(note >= 35 && note <= 44 && velocity > 0){
    int myPin=note-33; // to get a pinnumber between 2 and 9
    analogWrite(myPin, 255);
    notesToShutOff[myPin] = milliseconds;
// ...

Now, the index for the elements of an array declared as something[10] has a range from 0 to 9, thus

requires noteDuration to have been declared as
  int nodeDurations[11];

Same for notesToShutOff.
Also consider that myPin can be 44 - 33 = 11, which would require a declaration such as noteDuration[12].
12  Using Arduino / Project Guidance / Re: Burning to arduino on a breadboard...analogs (A0-A5) not recognized on: April 13, 2013, 09:15:06 pm
The files are part of the standard Arduino IDE, so if they are missing from the file system you should reinstall the IDE. But if you can compile the sketch for the Arduino the files should already be there; the problem, then, is in the compiler options.

It is unclear to me how the compiler options may change depending on the board you are using. Are you compiling from the IDE, or using a command from the command line? If compiling from the IDE, which board is selected from the Tools - Board menu? I tried selecting the Duemilanove with ATmega328 and my sketch compiled fine.
13  Using Arduino / Project Guidance / Re: Burning to arduino on a breadboard...analogs (A0-A5) not recognized on: April 11, 2013, 06:17:22 pm
Hi, it seems you are missing a header file:

error: pins_arduino.h: No such file or directory

It should be in the "variants" directory under ../Java/hardware/arduino (same location as cores and boards.txt). Probably your makefile doesn't list this directory in its -I(nclude) options.
14  Using Arduino / Installation & Troubleshooting / Re: Cannot Load Keywords.txt re-install processing on: April 11, 2013, 06:01:14 pm
Hi, I've never seen that problem but files named keywords.txt are associated to libraries -- both the Arduino core libraries and the user-installed ones. Since you reinstalled the Arduino software I would look into the libraries directory in your sketchbook directory (the default location for your sketches and libraries, usually somewhere under your home directory). You may try to rename it and create an empty "libraries" directory, see if the sketch opens, then move the existing libraries into the new directory until you find the bad one.
15  Using Arduino / Interfacing w/ Software on the Computer / Re: Linux serial comm with Uno rev3 problems. on: April 11, 2013, 05:39:17 pm
spatula I tried your suggestion of waiting a few seconds.  That does work.  I didn't realize the arduino reset every time a serial connection is made.  Is this constant across the arduino line?  Also has me wondering if there is a way to prevent the reset on opening the port.  At the moment the most immediate solution that comes to mind is writing a daemon to handle serial comm with the controller.

Your thought on my not handling the \r \n characters.  Technically I do handle any characters that I am not interested in.  Those just get overwritten with the next character from the serial stream.  Which probably isn't overly elegant but does make the code simple.

Thank you for your help.  I will have to follow up with some daemon or other code once I have something working.

Hi, there are some threads in this forum about the reset behavior, the last one I know of is here,153237. A solution that works on Linux is to redirect the stdin and stdout file descriptors of a new process to the Arduino serial port (using < and >). A 10uF capacitor between RESET and GND also works. The behavior is not universal (does not apply to the Leonardo) but pretty common.
Pages: [1] 2 3 ... 30