Show Posts
Pages: [1] 2 3 ... 12
1  Forum 2005-2010 (read only) / Development / Arduino Sleep and Wake? on: August 04, 2009, 10:36:44 am
I want to run a battery powered arduino, that will sleep for an hour then wake... run a few operations, then sleep for an hour again.

I have the sleep code working, but instead of using a hardware interrupt, like a physical button switch, I would like it to wake on its own after an hour.

Is there some clever way to leave a timer running that sets a pin high after an hour... to trip the wake pin... and restart my code?

I really just want to make a low power, xbee enabled device that will send out a data a few times a day, that can lat on batteries for a few months.  Really the time running should be just a few seconds a day.

2  Forum 2005-2010 (read only) / Troubleshooting / Re: Can't upload sketch! on: December 30, 2008, 02:56:16 pm
Which arduino is it?

What do you have hooked up to the board?

Is it getting power?

You should not need to reload the bootlader.

If you think you are putting out a lot of serial traffic you can verify this buy turning on the serial monitor in the arduino ide.  You should see the output.

When you "Upoad to board" the arduino board automatically gets reset, and listens for a short period on serial to see if a new sketch is being uploaded.
3  Forum 2005-2010 (read only) / Troubleshooting / Re: Can't save my projects ... on: December 30, 2008, 04:36:25 pm
What os?

I believe the samples are read only, just "save as" to a different folder or filename.

You could always change the permissions and overwrite files.  Personally I like to keep them as-is so I can use them for reference.
4  Forum 2005-2010 (read only) / Troubleshooting / Re: Powering the arduino pro mini on: August 29, 2008, 09:39:51 pm
yes you can, a single 9v will work as well
5  Forum 2005-2010 (read only) / Troubleshooting / Re: /dev/tty.ARDUINOBT-BluetoothSeri-1' already in on: February 08, 2008, 10:45:09 pm
That was my post and it fixed my problem, however I was not using bluetooth.

Have you installed any javax.comm or com.rxtx stuff on your mac?

I did because I'm a java developer, the default for rxtx is the use lock files to control ownership of the serial port.  This caused problems for me, however the com.rxtx libraries included in arduino, have the lock files turned off(thank you mellis).

When I replaced the files, my arduino was better.... simply got the right native libs loaded.

you might want to search for any other installations of serial drivers

 as root run the following command "find /System -type f -name "librxtxSerial.jnilib"  if you don't find anything its likely a different problem.
6  Forum 2005-2010 (read only) / Troubleshooting / Re: can I force my arduino to allow an upload? on: January 25, 2008, 04:42:25 pm
well I copied the RXTXcomm.jar and librxtxSerial.jnilib from the arduino distribution to /Libaray/Java/Extensions, and everythgin is good now....

My standalone java app works, as does arduino ide, thanks a bunch
7  Forum 2005-2010 (read only) / Troubleshooting / Re: can I force my arduino to allow an upload? on: January 25, 2008, 03:58:59 pm
This is definitely it thank you.

I installed the latest version of rxtx for use with javax.com myself recently and this make complete sense.... should I just copy the version from the arduino distribution over the ones I installed?

The reason I did this is because I am going to make a web based webcam controller...(I know... yawn)  I figured I would write it all in java... model2, so I could re-use the serial interface in a thick client in the future.
8  Forum 2005-2010 (read only) / Troubleshooting / Re: can I force my arduino to allow an upload? on: January 25, 2008, 11:46:08 am
ok I think I'm getting closer, I just installed the latest FTDI drivers

from /var/log/syslog

when i plug in the arduino

Jan 25 10:34:04 arimac3 kextd[10]: cache inconsistency detected; rescanning all extensions
Jan 25 10:34:11 arimac3 kernel[0]: Resetting IOCatalogue.
Jan 25 10:34:11 arimac3 kextd[10]: 0 cached, 403 uncached personalities to catalog
Jan 25 10:34:14 arimac3 kernel[0]: FTDIUSBSerialDriver:        0  4036001 start - ok


..... and then when I try to load my program


Jan 25 10:34:31 arimac3 [0x0-0x14014].Arduino 10[192]: Stable Library
Jan 25 10:34:31 arimac3 [0x0-0x14014].Arduino 10[192]: =========================================
Jan 25 10:34:31 arimac3 [0x0-0x14014].Arduino 10[192]: Native lib Version = RXTX-2.1-7
Jan 25 10:34:31 arimac3 [0x0-0x14014].Arduino 10[192]: Java lib Version   = RXTX-2.1-7
Jan 25 10:34:42 arimac3 [0x0-0x14014].Arduino 10[192]: Couldn't determine program size:    text         data          bss          de    hex      filename
Jan 25 10:34:45 arimac3 [0x0-0x14014].Arduino 10[192]: Binary sketch size: 2756 bytes (of a 14336 byte maximum)
Jan 25 10:34:51: --- last message repeated 1 time ---
Jan 25 10:34:48 arimac3 [0x0-0x14014].Arduino 10[192]: check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file.
Jan 25 10:34:48 arimac3 [0x0-0x14014].Arduino 10[192]: please see: How can I use Lock Files with rxtx? in INSTALL
Jan 25 10:34:48 arimac3 [0x0-0x14014].Arduino 10[192]: processing.app.SerialException: Serial port '/dev/cu.usbserial-A4001J3N' already in use.  Try quiting any programs that may be using it.
Jan 25 10:34:48 arimac3 [0x0-0x14014].Arduino 10[192]:       at processing.app.Serial.<init>(Serial.java:140)
Jan 25 10:34:48 arimac3 [0x0-0x14014].Arduino 10[192]:       at processing.app.Serial.<init>(Serial.java:72)
Jan 25 10:34:48 arimac3 [0x0-0x14014].Arduino 10[192]:       at processing.app.Uploader.flushSerialBuffer(Uploader.java:66)
Jan 25 10:34:48 arimac3 [0x0-0x14014].Arduino 10[192]:       at processing.app.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:55)
Jan 25 10:34:48 arimac3 [0x0-0x14014].Arduino 10[192]:       at processing.app.Sketch.upload(Sketch.java:1632)
Jan 25 10:34:48 arimac3 [0x0-0x14014].Arduino 10[192]:       at processing.app.Sketch.exportApplet(Sketch.java:1701)
Jan 25 10:34:48 arimac3 [0x0-0x14014].Arduino 10[192]:       at processing.app.Editor$41.run(Editor.java:2004)
Jan 25 10:34:48 arimac3 [0x0-0x14014].Arduino 10[192]:       at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
Jan 25 10:34:48 arimac3 [0x0-0x14014].Arduino 10[192]:       at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
Jan 25 10:34:48 arimac3 [0x0-0x14014].Arduino 10[192]:       at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
Jan 25 10:34:48 arimac3 [0x0-0x14014].Arduino 10[192]:       at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
Jan 25 10:34:48 arimac3 [0x0-0x14014].Arduino 10[192]:       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
Jan 25 10:34:48 arimac3 [0x0-0x14014].Arduino 10[192]:       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
Jan 25 10:34:48 arimac3 [0x0-0x14014].Arduino 10[192]:       at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

so maybe its the lockfile?  I just added permissions to /etc/group I have to logout to see if it fixes my problem.... I'll pos the results.
9  Forum 2005-2010 (read only) / Troubleshooting / Re: can I force my arduino to allow an upload? on: January 25, 2008, 10:03:56 am
hrm... blink loaded and running from my the windows box....

any ideas on how to fix the mac?... I know wrong forum....

From what I can see nothing is running that should be accessing he us or serial ports... my little java program shows them as free... reinstall arduino ide?
10  Forum 2005-2010 (read only) / Troubleshooting / Re: can I force my arduino to allow an upload? on: January 24, 2008, 11:13:00 pm
you know I upgraded my macbook pro today... maybe something went awry...  ill try my wifes windows box....
11  Forum 2005-2010 (read only) / Troubleshooting / can I force my arduino to allow an upload? on: January 24, 2008, 09:37:30 pm
I cant seem to get my arduino to accept an upload, whenever I try to upload I get this message

Binary sketch size: 2756 bytes (of a 14336 byte maximum)

processing.app.SerialException: Serial port '/dev/tty.usbserial-A4001J3N' already in use.  Try quiting any programs that may be using it.
 and a stack trace.....

so i wrote a program to try and determine what is using my serial port, because nothing should be using the serial port.

public class SerialBox {

    public static void main(String args[]) {
        SerialBox box = new SerialBox();
        ArrayList<String> portNames = box.listPorts();
        box.printPortOwners(portNames);
    }

    public void printPortOwners(ArrayList<String> portNames) {
        for(String portName : portNames) {
            try {
                CommPortIdentifier port = CommPortIdentifier.getPortIdentifier(portName);
                System.out.println("Name:" + port.getName() + " Owner:" + port.getCurrentOwner());
            }
            catch(Exception ex) {
                ex.printStackTrace();
            }
        }

    }

    public ArrayList<String> listPorts() {
        ArrayList retList = new ArrayList();
        Enumeration portList = CommPortIdentifier.getPortIdentifiers();

        while (portList.hasMoreElements())  {
            CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement();

            if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
                retList.add(portId.getName());
            }
        }
        return retList;
    }
....

the output is as follows

Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
Name:/dev/tty.usbserial-A4001J3N Owner:null
Name:/dev/cu.usbserial-A4001J3N Owner:null
Name:/dev/tty.Bluetooth-PDA-Sync Owner:null
Name:/dev/cu.Bluetooth-PDA-Sync Owner:null
Name:/dev/tty.Bluetooth-Modem Owner:null
Name:/dev/cu.Bluetooth-Modem Owner:null
Experimental:  JNI_OnLoad called.
...

did I fry my arduino somehow?  /dev/tty.usbserial-A4001J3 has been working for me from the beginning.

When I start it the tx light flashes a few times... is there a way to for it to accept an upload?

Also I tested with an led and a 220ohm resistor, and it looks like pins 0, 1, and 13 are stuck to HIGH.

Help!
12  Forum 2005-2010 (read only) / Development / Re: LCD shield and/or LCD serial backpack on: March 16, 2008, 08:09:16 pm
whats the word cheater, been over a month since your last post on this one?
13  Forum 2005-2010 (read only) / Development / Re: LCD shield and/or LCD serial backpack on: February 25, 2008, 09:45:23 pm
cheater are you going to sell them?  I would like to pick one up for a 4x20 I have
14  Forum 2005-2010 (read only) / Development / Re: LCD shield and/or LCD serial backpack on: February 24, 2008, 01:14:18 am
Cheater will this support the KS0108 graphical LCDs?
15  Forum 2005-2010 (read only) / Development / Re: arduino with internal oscillator on 1Mhz on: May 21, 2009, 08:56:27 am
yeah, I just think I'm doing it wrong.  I think all the fuses are reset when you flash the bootloader, so maybe I'm just makeing changes in the incorrect order.

I think I should
1) change bootloader speeds F_CPU etc, flash bootloader
2) change fuses, for slower clockspeed
3) load my program

but somehow I seem to be meseeing it up, it never runs without a resonator in.  I have a pretty simple device created, I just need it to run at lower voltages, and the time to be reasonably correct.  I guess I'm stumped for now.
Pages: [1] 2 3 ... 12