Show Posts
Pages: [1] 2
1  Using Arduino / Installation & Troubleshooting / Unreliable programming with new Arduinos on: January 19, 2013, 01:07:01 pm
Hi!

In an attempt to get up to date with the current state of Arduino, I ordered two Micros and two Leonardos. Unfortunately, I'm having a bit of an issue trying to upload sketches to both. About 4 in 5 uploads fail with the following error:

Code:
processing.app.SerialException: Serial port '/dev/tty.usbmodem24111' already in use. Try quitting any programs that may be using it.
at processing.app.Serial.touchPort(Serial.java:119)
at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:201)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:67)
at processing.app.Sketch.upload(Sketch.java:1671)
at processing.app.Sketch.exportApplet(Sketch.java:1627)
at processing.app.Sketch.exportApplet(Sketch.java:1599)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2380)
at java.lang.Thread.run(Thread.java:680)
My workaround right now is to repeatedly click Upload until it succeeds. Any idea what this is? Uploads to my Duemilanove (FTDI-Interface) with Optiboot work without error. This is on Mac OS 10.7. Happens with the cable directly on my laptop and on the USB hub.
2  Using Arduino / Microcontrollers / Re: Pro Mini 3.3V vs. Optiboot on: February 10, 2012, 10:09:10 am
I (as the one who started this) have basically given up on the 3.3V units, mostly out of laziness.
3  Using Arduino / Interfacing w/ Software on the Computer / Re: Serial communication with php on: March 04, 2011, 04:41:37 am
Serial communication doesn't work with this naive approach. (I've been there myself, on Perl.) There are serial libraries for most languages that help you implement serial communication.
4  Using Arduino / Project Guidance / Re: external 5V at +5V pin, and USB connection on: March 01, 2011, 01:09:00 pm
Your shield regulator talk confuses me. But I have used (the Duemilanove) with 12V on the DC jack and on USB simultaneously, without problems.
5  Community / Bar Sport / Re: My first and probably last arduino project on: March 01, 2011, 01:02:17 pm
Kudos for having your first and nearly-last Arduino project built from scratch on perfboard. ;-)

Why is poordude poor if he can build stuff like this?  smiley-money
6  Using Arduino / Project Guidance / Re: Powering an Arduino with batteries? on: March 01, 2011, 01:47:37 am
I have built "Bulbuino"*, an intervalometer for photography. It runs off a 9V block that powers an Arduino Pro Mini through the Pro Mini's regulator. In this highly inefficient setup (9V battery on a 3.3V Arduino!), the battery reliably lasts about 24 hours. I have seen 48 hours in tests, too. Mind you, though, that the Pro Mini does not have a USB interface and wastes no power for that. It also only runs at 8 MHz and hopefully uses a little less power than the full 16MHz version.

The Bulbuino has a trivial voltmeter so the user can track how much juice is left in the battery.

You should not expect miracles from a trivial setup, but a 9V block will probably last at least 12 hours on a Duemilanove/Uno. Which may or may not be enough for your applicaton.

* https://github.com/mschmitt/bulbuino

(Edit: Fixed time specifications after reading my own notes.)
7  Using Arduino / Interfacing w/ Software on the Computer / Re: Problems with the com port on the Mac OS on: February 21, 2011, 02:07:17 am
I have not found in a minicom for MacOS (minicom version 2.2 (compiled Mar 16 2007)) as a set character that ends the string.
I want to '\n', as he puts '\r'.
This can somehow set this up?

Menu -> cOnfigure -> Screen & Keyboard -> Add Linefeed

The default seems to be "no" (which has always worked for me). Does this do what you expect?

Edit to add: minicom version 2.4 (compiled Dec 11 2010)

By the way, is for MacOS terminal emulator runs as usual, not a console application? (I found iTerm, but he does not want to work with com port, only the network)

There used to be ZTerm, but I think its development is stalled. ZOC still seems to be available, too, but it has always been way overpriced.
8  Community / Bar Sport / Re: My first and probably last arduino project on: February 17, 2011, 01:22:19 pm
Will this balcony thing happen tomorrow? Or within a few months? You're not building for eternity, are you? Those plastic parts won't survive german weather very long anyway. The temperature range in the black plastic will be at least 100ÂșC during the year.

Finish your thing now, make a video for documentation (timelapse perhaps), publish the code, build some self-esteem. When the balcony goes, rip the monster apart and move along to the next big project. Don't let those old idiots who prefer a north-facing balcony ruin your talent. :-)
9  Using Arduino / Microcontrollers / Re: Pro Mini 3.3V vs. Optiboot on: February 17, 2011, 02:56:06 am
This guy's post seems to say "I did modify the bootlader and reduced the baud rate and still have to press RESET to properly tickle the Arduino on upload".

I'm not sure whether putting Optiboot onto a very limited number of 8MHz units is worth diving into bootloader compilation for me. It's not like I have an industrial-scale 8MHz operation going. smiley-razz

What's the deal with those super-fast upload speeds anyway? It seems to be a tradeoff between compatibility and a 2 second gain on each upload.  smiley-confuse
10  Using Arduino / Microcontrollers / Re: Pro Mini 3.3V vs. Optiboot on: February 16, 2011, 06:46:12 pm
Thanks! Out of these, editing boards.txt sounds like the most obvious solution. I have replaced 115200 with 57600 in this section of boards.txt from Optiboot:

Code:
pro328o.name=[Optiboot] Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328
pro328o.upload.protocol=stk500
pro328o.upload.maximum_size=30720
pro328o.upload.speed=57600
pro328o.bootloader.low_fuses=0xff
pro328o.bootloader.high_fuses=0xdc
pro328o.bootloader.extended_fuses=0x05
pro328o.bootloader.path=optiboot
pro328o.bootloader.file=optiboot_atmega328_pro_8MHz.hex
pro328o.bootloader.unlock_bits=0x3F
pro328o.bootloader.lock_bits=0x0F
pro328o.build.mcu=atmega328p
pro328o.build.f_cpu=8000000L
pro328o.build.core=arduino

Unfortunately, this didn't help a bit. Behaviour is still the same.

This section somewhat implies that Optiboot does in fact come with an 8MHz version, doesn't it?
11  Using Arduino / Interfacing w/ Software on the Computer / Re: Problems with the com port on the Mac OS on: February 16, 2011, 05:16:38 pm
I recall cu only as one really kludgy last-resort tool from the old-school UNIX world. With minicom (installed via Homebrew http://mxcl.github.com/homebrew/ ), serial communication works flawlessly.
12  Using Arduino / Microcontrollers / Pro Mini 3.3V vs. Optiboot on: February 16, 2011, 04:45:08 pm
I have a number of Arduino Pro Minis with Atmega328 in two flavours: 3.3V @8MHz and 5V @16MHz.

Upgrading the 5V Pro Minis to Optiboot via AVR ISP MkII has worked nice, maybe with the small flaw that the Optiboot board options want them to be selected as Duemilanoves. Nothing serious, as the specifications are basically the same and things seem to work alright.

However, when a 3.3V Pro Mini is upgraded with Optiboot, it won't accept any sketches through the Arduino IDE anymore.  Some blinkage of the TX LED on the FTDI board, then timeout. If I go back to the non-Optiboot loader, it programs fine again. I have reproduced this multiple times, back and forth, with two 3.3V Pro Minis. (I only have one FTDI board, though.)

Any suggestions on this? Have I hit a bug in Optiboot?

-martin
13  Using Arduino / Microcontrollers / Re: No-Wait bootloader, how? on: February 16, 2011, 01:48:11 pm
Well, what can I say? I just tried another Duemilanove and burning Optiboot from the Arduino IDE went fine at the first attempt.  smiley-cool

Differences from before:
- This board has not undergone any attempts at bootloader manipulation before.
- This time, power came from DC, not from USB.

Will wire a Pro Mini for the Optiboot treatment soon.

Works great on the Pro Mini, too, except for 3.3V models. Will have a look at Optifix.



Thanks for your insights,  smiley

-martin
14  Using Arduino / Microcontrollers / Re: No-Wait bootloader, how? on: February 16, 2011, 03:04:26 am
Try a different USB cable.  If there's a HUB in the middle, try a different port and try without the HUB.

Changing the cable didn't do much, but while the Arduino IDE was trying to flash, I took note of the avrdude command line it uses, pasted this onto my prompt and programming immediately worked. I now have one optiboot enabled Duemilanove.

Good grief, how I hate when things get solved by Voodoo. smiley-confuse

Lets see when I can find the time to wire up one of the Minis for ISP.

-martin
15  Using Arduino / Microcontrollers / Re: No-Wait bootloader, how? on: February 16, 2011, 02:05:33 am
Ah, indeed! I hadn't used the UNO yet. Now I wrote a quick blinky blinky sketch to test it, and the sketch really runs immediately after power-on. One less reason to consider moving to bare AVR.

My troubles with avrdude aren't ending, though. I tried the command above and I still get errors.

Code:
[martin@macbook martin]$ avrdude -v -v -v -pm328p -cavrispv2 -P usb
avrdude: Version 5.10, compiled on Feb 12 2011 at 10:47:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/usr/local/Cellar/avrdude/5.10/etc/avrdude.conf"
         User configuration file is "/Users/martin/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : avrispv2
avrdude: usbdev_open(): Found AVRISP mkII, serno: 000200057737
avrdude: usbdev_open(): using read endpoint 0x82
avrdude: stk500v2_getsync(): found AVRISP mkII programmer
         AVR Part                      : ATMEGA328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65     5     4    0 no       1024    4      0  3600  3600 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500V2
         Description     : Atmel AVR ISP V2
         Programmer Model: AVRISP mkII
avrdude: usbdev_recv_frame(): usb_bulk_read(): Operation timed out
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_getsync(): found AVRISP mkII programmer
         Hardware Version: 191
         Firmware Version Master : 1.13
         Vtarget         : 5.0 V
         SCK period      : 10000.00 us

avrdude: usbdev_recv_frame(): usb_bulk_read(): Operation timed out
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: usbdev_recv_frame(): usb_bulk_read(): Operation timed out
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_getsync(): found AVRISP mkII programmer
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 1.01s

avrdude: Device signature = 0xffffff
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

This can't be intended behaviour, can it?

Burning the optiboot bootloader from the Arduino IDE doesn't work, either:

Code:
avrdude: usbdev_send(): wrote 0 out of 5 bytes, err = usb_control_msg(DeviceRequestTO): unknown error
avrdude: stk500_send_mk2(): failed to send command to serial port

I would love to be able to bring optiboot to the Minis, which would make them a lot more versatile.
Pages: [1] 2