Show Posts
Pages: [1] 2 3 ... 29
1  Using Arduino / Installation & Troubleshooting / Re: Leonardo does not show Serial port after application loaded - reset? SOLVED on: December 14, 2012, 12:48:09 pm
Root cause found and fixed .. a word of warning about Leonardo and related tip.

The root cause of the problem seemed to be an error in an interrupt or setup, causing the system to keep re-running setup and hence not showing the port. 

Since error handling is not enable on the arduino, I used another trick to catch the error and keep the system from going into loop / dea mode.  The details below explain the code change.  

Create a variable ..
byte setupRunTimes = 0;

Then in setup .. add this code before any other code, except Serial.begin(), in void setup():
Code:
  setupRunTimes++;
   if (setupRunTimes>1){
      return;
   }

Add this code in the first part of void loop():
Code:
 if( setupRunTimes > 1 ){
    Serial.println("error on setup");
    delay(1000);
    return;
  }

Hope that helps someone.
2  Using Arduino / Installation & Troubleshooting / Re: Leonardo does not show Serial port after application loaded - reset? on: December 13, 2012, 06:26:54 am
Update: Fixed.

I was able to use ArduinoISP to reload the bootloader using an old MEGA as a programmer.  This revived both boards and I was able to reload Blink - they feel new again.

So if anyone has an issue with the Leonardo not showing the serial port after loading a sketch, download ArduinoISP and use as directed.  If the only other board, this may help (I didn't have to do that since I had other boards around to use as a programmer, just a FYI).
http://petervanhoyweghen.wordpress.com/2012/09/16/arduinoisp-on-the-leonardo/

3  Using Arduino / Installation & Troubleshooting / Re: Leonardo does not show Serial port after application loaded - reset? on: December 11, 2012, 05:25:12 pm
I found another post that seems to answer my question. 
http://arduino.cc/forum/index.php?action=printpage;topic=112060.0

Summary: You can't use a FTDI Breakout to upload a sketch to the Leonardo.  So if you upload a program that makes the serial connection stop working - you need an external programmer (hopefully) to fix it.  I have not tried the external programmer as I don't have one yet.

If I am able to revive the software killed boards I'll post details.

4  Using Arduino / Installation & Troubleshooting / Re: Leonardo doesn't talk to serial monitor on: December 11, 2012, 02:53:26 pm
Ah - in my case the serial monitor was working, just not my application.
5  Using Arduino / Installation & Troubleshooting / Re: Leonardo does not show Serial port after application loaded - reset? on: December 10, 2012, 04:48:18 pm
Thanks for the pointers, I'll work on a bootloader solution if there is no way to update the sketch via the serial connection and USB to Serial converter.  The bootloader is not the root cause, it is the application.  So if I can just reload the Blink sketch for example, it should revive the board.

If this was a standard board, I could just hook to the serial pins and reload the application using the USB FTDI Basic adapter.  Are there "pins" for the primary serial / is it possible to load a sketch onto the Leonardo this way?
6  Using Arduino / Installation & Troubleshooting / Leonardo does not show Serial port after application loaded - reset? SOLVED on: December 10, 2012, 07:22:26 am
I have some Leonardo boards, when I load a certain application, it kills the board in that Serial no longer shows and it can not be uploaded to again via USB.  

On the Leonardo - Is there a way to either reload the bootloader / reset the board or load a new application using an external usb/serial converter?

I have a FTDI Basic and tried that, but maybe due to the fact that the serial port pins are a secondary serial port, the standard method of loading a script does not seem to work.  If it should work using standard pins, I'll try again.  If reloading the bootloader clears the application, that may work as well, just not sure how to do that with the Leonardo.  If I need an external programmer, then I may get one so I can revive and kill them over and over to see what is the root cause, etc.

Details:
Working:
When I plug it in, it shows Com port 70 .. then that goes away and port 71 shows and works - can be uploaded to.
Broken (after loading application):
When I plug it in, it shows Com port 70 .. then that goes away and port 71 does not show.

Thank You
7  Using Arduino / Installation & Troubleshooting / Re: Leonardo doesn't talk to serial monitor on: December 10, 2012, 07:08:34 am
This may sound odd, but try changing this setting in your Serial object in your application:
RtsEnable =True
and try again.

I found the same issue on my (arg - Vista) machine, where it would work fine when talking with the Arduino serial monitor, but not my application.  I created a simple print and receive set of apps, and they didnt work.  I then updated the RtsEnable setting and amazed it started working.

Hope that helps
8  Using Arduino / LEDs and Multiplexing / Re: 6x TLC5940 32 rgb leds on: May 22, 2012, 10:20:37 am
That looks fantastic. 
9  Using Arduino / LEDs and Multiplexing / Re: WS2803 versus WS2801 on: January 30, 2012, 08:11:23 am
Just a FYI - I updated the above library with changes noted as update 2 along with fixed findings.  I did not want someone reading false findings so I just cleaned up the above post and posted the updated library.  Leaving this post just in case someone had already been through the last post and/or downloaded it.
10  Using Arduino / LEDs and Multiplexing / Re: WS2803 versus WS2801 on: January 29, 2012, 10:04:22 am
The comments below are from initial testing only and are subject to change based on feedback.

Findings:
The 144 bit requirement means this chip needs to be fed in full 18 LED values.  So if you have 52 LEDs, you have to say 54 LEDs in the setup and then just turn the last two off in your code if using the old library.  I created a version of the single library that buffers the last part automatically allowing you to use 52 in your code.  

Other notes:
The data does not go into the chips the say way.  The order of the ports is normal 0 through 17 but the data is sent to each chip backwards.  So if you have three chips, the first chip data should be chip 3 and the final chip data should be chip 1.   An updated version of the library attached below - replacing the old one.

Updated Library:
Attached is the WS2803Single library:
Update 1) This version will buffer the difference if an increment of 18 LEDs is not used. Note that when you use numPixels() it will return the new LED count, not the value passed in. So if you start with 37 - it is buffered to 54 .. so numPixels() will return 54.  In your code you can simply use the same value originally instantiated .. just do not rely on the numPixels method for this unless you want to include buffered LEDs not attached in your patterns.
  
Update 2) This library sends the data in the correct order (chips backwards - ports forward).  This should make using the original library for WS2801 .. the singleWS2801 and this library work with no other change needed in the code outside the class and library names. Tested both SPI and bigbang methods.
11  Using Arduino / LEDs and Multiplexing / Re: WS2803 versus WS2801 on: January 28, 2012, 08:50:53 am
Quote
The next question is trying to figure out how to address individual outputs.  With Adafruit's WS2801 library, it turns the outputs on in groups of 6.  So if I send it Color(r, g, b) with r=255, g and b=0, I get ouputs 0, 3, 6, 9, 12, and 15 turned on.  If I send r=0, g=255, and b=0, the next set of outputs come on, 1, 4, 7, 10, and 16.  And with b=255, r and g=0, the last set comes on, 2, 5, 8, 11, and 17.

I think it's possible to address each one separately, it's figuring out how to change the library to do that.

Here is an updated version of the library that addresses each LED individually.  Have not tested with the WS2803 - just WS2801.

Differences from the WS2801 proper library:
The led count used when creating the object should be the individual LED count
The setPixelColor method takes only one color param due to being single LED.
The getPixelColor method returns a standard 8 bit color value
The example just lights up one after another in a loop.

 
This should provide an easy starting point for addressing individually.  I'll try to find time to test with WS2803 but have circuit questions.

12  Using Arduino / LEDs and Multiplexing / Re: WS2803 versus WS2801 on: January 27, 2012, 03:29:28 pm
Great - congrats on getting it going smiley  Nice chip. 
13  Using Arduino / LEDs and Multiplexing / Re: WS2803 versus WS2801 on: January 27, 2012, 02:31:48 pm
I would try to hook it up and let it fly, it should work.  I ran through the code and see nothing that would need to be changed in reference to the 144 clock cycles.  I put one of those on a breadboard and used on of my WS2801 controllers, unmodified, and it faded up and down a white LED.  That tells me that any code that talks to a WS2801 - should work for the WS2803 as well.  I do not have the time right now to download and that specific library .. but I'd give it a 90% chance of working unmodified. 
14  Community / Bar Sport / Re: Arduino At RadioShack...ITS ABOUT TIME on: January 25, 2012, 08:05:18 pm
I went to the Shack tonight and they not only had the Uno and Mega but PIR and Sonic Range Sensors, some motor control versions or shields.  The prices were high but I am used to that with the Shack.  The clerk seemed interested in the stuff but I wouldn't say hobbiest. 

It was nice to see they game in with a nice selection, not just one arduino and buck each LEDs, but some actual shelf space.
15  Topics / Device Hacking / Re: Harvesting components from devices on: January 04, 2012, 11:58:11 am
I hacked an X10 PIR motion sensor since I had it around and useless since I don't use X10 anymore.  To do that I just used a meter to determine what changed when it clicked and soldered to that.

Also a broken stereo had some really high quality rotary encoders and button matrix setups with nice wires - little to no soldering needed.  I posted details along with the pictures and code for the encoder, button matrix and the discovery phase in the exibitionist area - but may be useful here as well - so here is a link. 
http://arduino.cc/forum/index.php/topic,67382.0.html

I have yet to hack another but will for sure pull a stereo like this before the "clam truck" eats it.
Pages: [1] 2 3 ... 29