Show Posts
Pages: [1] 2 3 ... 7
1  Forum 2005-2010 (read only) / Troubleshooting / Re: Help!! Error uploading Blink to Seeeduino on: May 18, 2009, 09:07:07 pm
When the auto-reset switch is set, the board will reset into its bootloader mode whenever the serial port is opened.  This allows the programming software to put it into a known state where it can send the new program code to the board.

However, if your code uses the serial port and you want to support connecting to the device while it is running, you wouldn't want auto-reset enabled.  That's why the switch is there to let you disable that functionality.
2  Forum 2005-2010 (read only) / Troubleshooting / Re: sprintf help! on: April 26, 2009, 03:57:34 pm
You may need to play with the default promotion of the arguments.  I would explicitly cast the arguments to the long versions of the types, i.e.

sprintf(data, "%ld,%f,%ld", (long)int1, (double)float1, (long)int2);
sprintf(data, "%ld,%e,%ld", (long)int1, (double)float1, (long)int2);

Also, make sure that the data array is large enough to hold the output.  Also, beware that sprintf can pull in a LOT of code, so it may not be the best tool for you.
3  Forum 2005-2010 (read only) / Troubleshooting / Re: Error when starting up Arduino BT? on: April 24, 2009, 02:13:02 am
This warning seems to be a compiler bug triggered when building C++ code.  See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34734 for the bug report.  It seems to be harmless but annoying.
4  Forum 2005-2010 (read only) / Syntax & Programs / Re: Stack and heap on Arduino Mega on: May 12, 2009, 04:28:16 pm
My understanding is that the memory map on all the Arduino boards looks like

INITIALIZED VARIABLES
UNINITIALIZED VARIABLES
HEAP
STACK

The heap grows up from the end of the uninitialized variables, while the stack grows down from the top of RAM.  If you use too much of either, you collide and bad things can happen.

The Mega changes the top of RAM, so there's more separation between the two areas, but the ultimate size of either depends on how many global/static variables you define, since those control where heap begins.
5  Forum 2005-2010 (read only) / Syntax & Programs / Re: LED Matrix Font on: April 13, 2009, 11:53:42 pm
1) Make sure you store the font in PROGMEM.  You've got a lot more of that than RAM, and if it's in RAM, it's already eating away at PROGMEM as the program has to copy it from Flash to RAM during startup.

2) Since all characters are going to always be 7 dots high, just store them that way.  Use a table to point to the start of any character and the number of columns to read.  So, you'd use something like

const char chr0[4][7] PROGMEM = { ..... };

const char *chrs[] PROGMEM = { chr0, chr1... };

You can compute the size by looking at the address of the next character as the stop.  Have a dummy character at the end that you don't use to act as a sentinel.
6  Forum 2005-2010 (read only) / Interfacing / Re: retrieving my facebook notifications? on: April 03, 2009, 09:11:49 am
OK, here's a quick hack.  I just tried this with the curl tool at the Linux command-line, but you should be able to do similar from the Ethernet shield.

You can get away with just making a HEAD request.  The key header you want to read is the "Last-Modified" one.  This only changes when you get a new notification, so you can just save the last one, compare it with the new one you've read, and if they differ, you know there's been a change.

Of course, you should only look for that header if you get a "200 OK" response -- you don't want to process an error from the server.

In your HTTP code, you may need to tweak the User-Agent line you send.  It worked for me with "User-Agent: Arduino" and with a user-agent I copied from Firefox, but not with the default one sent by curl.
7  Forum 2005-2010 (read only) / Development / Re: Library for TLC5940 16-channel PWM chip on: July 10, 2009, 09:27:30 am
I just started a new topic at http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1247234344 about the RGB LED shield that's available based on this library.  It's been really great!
8  Forum 2005-2010 (read only) / Development / Re: Library for TLC5940 16-channel PWM chip on: May 28, 2009, 09:01:03 pm
acleon, that's quite impressive!  How often are you refreshing the TLC with new data and changing columns?  How much does this affect the LEDs brightness, since they're effectively getting 1/11th as much power sent to them?
9  Forum 2005-2010 (read only) / Development / Re: DNS and DHCP Support with Ethernet Library on: September 10, 2009, 09:13:16 pm
Cool... I'll have to look at modifying the Webduino library to allow use of this too.  Anything to make it faster and use less code!
10  Forum 2005-2010 (read only) / Development / Re: Introducing the Webduino web server library on: May 03, 2010, 12:42:28 pm
In the webduino code, I used strtoul in the example just because it's interface is cleaner than atoi.  In particular, you can tell if the string wasn't a number because you can tell that no characters were scanned by looking at the out location.
11  Forum 2005-2010 (read only) / Development / Re: Introducing the Webduino web server library on: May 02, 2010, 08:00:21 am
This is the point where inserting some Serial.print() commands into your form handling code is very useful.  Have the Arduino show you what it's receiving from the form.  I looked over your code and the modified form you're sending and didn't immediately see any problems, so it's going to be something subtle.
12  Forum 2005-2010 (read only) / Development / Re: Introducing the Webduino web server library on: January 08, 2010, 10:16:29 am
Basically, in the code that outputs the radio buttons, you need to look at the current value of the "what LED is lit" variable and change the output to add that checked attribute to the radio button that's lit.
13  Forum 2005-2010 (read only) / Development / Re: Introducing the Webduino web server library on: January 06, 2010, 07:12:09 pm
The code seems OK.  You've got both pins set to output.

Getting a reset form sent back after a submit is due to the code that outputs the form controls not reflecting the current value of buzzDelay -- you need to output a
Code:
checked="checked"
for the radio button that should be selected by default.

I'd try using the Serial library to add some prints inside the POST handler so you can see if the buzz parameter is being processed.
14  Forum 2005-2010 (read only) / Development / Re: Introducing the Webduino web server library on: November 27, 2009, 05:01:28 pm
Also, you can look at the new example Web_RSSFeed (it's in SVN but not in a ZIP file yet)... the default page has a link to the RSS feed from the same device.  The example Web_Image uses a <img> link from the page to fetch the data for a PNG file from the device.
15  Forum 2005-2010 (read only) / Development / Re: Introducing the Webduino web server library on: November 27, 2009, 04:59:56 pm
Each page that you want to host is a separate call to server.addCommand().  If the Web_Demo sketch, there's calls to this for "json" and "form" -- if you go to http://xx.xx.xx.xx/demo/form, you'll get different output than just http://xx.xx.xx.xx/.  One key thing -- you don't really have separate pages here... the page is just a function that outputs some HTML, and the URL requested determines what command is called to do that output.
Pages: [1] 2 3 ... 7