Show Posts
Pages: [1] 2 3 ... 22
1  Development / Other Software Development / Re: OpenMoCo Menu Manager - completely automated menus for Arduino on: January 20, 2014, 03:16:00 pm
i am getting error when try t compiling this example OMMenuMgr.ino.

'BUTTON_SELECT' was not declared in this scope.

any help?

Sounds like you did not properly install the library, or include it in your sketch?  BUTTON_SELECT is an enum defined in OMMenuMgr.h
2  Using Arduino / Project Guidance / Re: Where did go??? on: January 20, 2014, 03:13:31 pm
That library is now available here:
3  Development / Other Software Development / Re: AT90USB64x/128x Support for Arduino IDE on: June 13, 2013, 10:08:42 am
1.5.x supports much more than the Due - it provides a complete 3rd party build process capability, which allows us to compile the raw, unmodified LUFA libraries and make them accessible in Arduino sketches.  The 1.0.x build only provides a brief, highly modified subset of LUFA - borrowed from Mattairtech and Peter Barrett (looks like some of the credit is not called out in the readme, we'll get that taken care of today.)

If you get the 1.5 nightly build up and working, per our github conversation - make sure to check out the KeyboardHost example, that's the general direction we're thinking of going with the LUFA integration, and would love feedback on it.
4  Development / Other Software Development / Re: AT90USB64x/128x Support for Arduino IDE on: June 12, 2013, 11:15:29 am
FYI: I suggest looking at using the 1.5 version in github, with Arduino 1.5.x we now can make available all of the LUFA libraries as well.  Still fixing everything up to work with the 1.5.x directory structures for libraries (a major pain, to be honest - and something I can't get working right no matter what), but there's also a nice KeyboardHost library included.

5  Development / Other Software Development / Re: AT90USB64x/128x Support for Arduino IDE on: June 12, 2013, 11:13:49 am
Hi Kirash,

I pushed a fix to the github repo for you this morning.

Here's a link to the github issue:

6  Development / Other Software Development / AT90USB Core for Arduino IDE on: May 21, 2013, 08:31:34 am
Hi all, here's our AT90USB core for the Arduino IDE, including a LUFA-based bootloader that's been slimmed down, and allows bootloader entrance by holding a pin low during power-on.

Supports AT90USB646/7, AT90USB1286/7, and 1287 USBKEY (Atmel bootloader)

The only thing we haven't tested thus far is USB OTG, but we'll be done testing that soon.  USB works fine, the multiple serials work fine, PCInts, HW Ints, etc.

Feedback, or suggestions, are much appreciated.

EDIT: Apologies, although I searched first, I just realized that I had already posted this.  I can't delete this post, so if one of the mods would, that would be awesome.
7  Development / Other Software Development / Re: OpenMoCo Menu Manager - completely automated menus for Arduino on: February 27, 2013, 10:48:03 am
Hi Mike,

Sorry for the delay!

The issue is not really debouncing, but the checkInput() method does a lot more than that - you'll note that it handles escalating values the longer an input is held, dealing with returning back to menus from screens, etc.  To handle a sixth input will be a bit more complex, because you probably want that input to behave like two of the other inputs. (e.g. emulate INCREASE or DECREASE based on direction of turn.)  The best way to do this will be to modify the OMMenuMgr library file and make _checkAnalog() a protected virtual, and then sub-class the OMMenuMgr library, providing your new _checkAnalog() function to properly return the button type.  This way, you can make your own _checkAnalog() method that returns one of BUTTON_NONE, BUTTON_FORWARD, BUTTON_BACK, BUTTON_INCREASE, BUTTON_DECREASE, BUTTON_SELECT based on how your inputs are read.

You may also want to make setAnalogButtonPins() virtual as well, so you can pass the correct information in without hard-coding it.  If you're still interested in doing this, I can make these virtual changes to the core library so that you won't have to worry about upgrades later.  BTW, the new home for this library is:

8  Development / Other Software Development / AT90USB64x/128x Support for Arduino IDE on: February 27, 2013, 09:02:11 am
Hi all,

We recently started working with the AT90USB646 series of uC's on a project, as they perfectly fit the bill for us.  To this end, we wanted to keep compatibility with the Arduino environment for our customers.  While there appeared to be a few other attempts to add support, they didn't really work for us, so we created a little patch.

One of the big problems for us was the Atmel bootloader, and the original LUFA bootloader, were fairly complex in initiating the bootloader.  We include a modified LUFA CDC bootloader that automatically goes into the bootloader at start-up, but will automatically start the program if PF0 is high.  This way, you can simply attach a button to PF0 and press it during power-on to start the bootloader for firmware update.  We also needed a bootloader indicator, so PC6 is flashed while in the bootloader (you can attach an LED, LCD backlight, etc.)  The new bootloader is also at around 4k, freeing more flash space.

Everything is available here:

If people like it, we can look at doing a merge and pull request with the core Arduino project.

9  Using Arduino / Microcontrollers / Re: Modifying Optiboot to Upload Sketches over RS485 on: December 08, 2012, 11:04:10 am
Hi Korstian,

The code I included in my latest response should be added to the putch() function.  With RS485 you must tell the transceiver when to go into transmit mode, and you do that whenever you are sending data back.  Since putch() is used to push each byte out down the serial channel, you add the control over the DE/RE line to that function, and make sure to account for the proper amount of time it takes the driver to push out the byte before disabling transmit mode. 

There's a complete working implementation of the bootloader in the source package you can download from here: you could simply modify the putch() function to use your correct DE/RE pin and then "make nanoMoCo"
10  Using Arduino / Programming Questions / Re: Passing a string to a function/sub on: December 04, 2012, 06:10:56 pm
I get this error tho;

 error: cannot convert 'StringSumHelper' to 'char*' for argument '1' to 'void wltl(char*)'

void wltl(char *logmessage) { // write line to log

And I call it with this;

  wltl("IP Address: " + String(ip[0]) + "." + String(ip[1]) + "." + String(ip[2]) + "." + String(ip[3]));

The WLTL routine is suppose to make live easier, to centrally controll weather or not to write log items to disc, or add time stamps.

How can you convert a complex object like String to a char pointer?

You can't.

"ABC"  is a const char[3].  Get the plus operators out of your argument, as I said earlier. 

Consider the following, as has already been indicated to you by majenko (get rid of String):

char logmsg[100];
sprintf(logmsg, "IP Address: %d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);


Your life will be simpler, and your sketch will be smaller.

11  Using Arduino / Programming Questions / Re: Timer4 on Leonardo on: December 04, 2012, 05:46:51 pm
Have you considered just using the MsTimer2 library which already handles Timer4 on Leonardo?

That is, using it on the Leonardo works fine, as it substitutes Timer4 for Timer2
12  Using Arduino / Programming Questions / Re: Passing a string to a function/sub on: December 04, 2012, 05:42:02 pm
You are not passing five arguments, you are passing one argument and using the overloaded + operator of the String class to construct that argument.  Stop putting that operator in the argument, either construct your new string first, or pass multiple strings as multiple arguments.

13  Using Arduino / Motors, Mechanics, and Power / Re: Stepper Position Sensing and Control on: December 04, 2012, 12:00:13 pm
If you just need a starting reference point, consider attaching a hall effect sensor to the housing, and a small magnet to the dial, such that the magnet is directly over the hall effect sensor at 360'.  Then, you can just move in either direction until the magnet is directly over the sensor at startup.
14  Using Arduino / Programming Questions / Re: Boolean Operators..&& (AND) is working but ! (NOT) is'nt working on: December 01, 2012, 10:05:50 pm
 if((!readString.indexOf("test") >0) && (!readString.indexOf("test2") >0))

See the operator precedence:

Note that ! is a higher precedence than >.

Consider what happens when we parenthesize by precedence:

if( !(readString.indexOf("test")) >0 && !(readString.indexOf("test2")) >0 )

PaulS is right too:
readString.indexOf("test")) <= 0
is a much more readable test and faster to type.
15  Using Arduino / Programming Questions / Re: Use momentary to trigger output for a time w/o using delay? on: December 01, 2012, 09:59:24 pm
    ledOn = HIGH;
    digitalWrite(LEDPin, lodOn);

This assures that the state of the LED and the value of ledOn never get out of sync.

I know that you think it won't happen, but it does. A month later, you make a change to the digitalWrite statement and forget to change the following statement, and you spend a long time trying to figure out what went wrong with such a simple change.

Stranger things have happened!  A good point.  In general, I would isolate the LED code out of the loop too, unless I didn't expect that I'd do much more in my sketch.  I hate seeing long loop/main functions.
Pages: [1] 2 3 ... 22