Show Posts
Pages: [1] 2
1  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.1i for Windows (installer, drivers, etc) +SRC on: October 28, 2012, 07:15:12 am
I don't know if they're in the next versions.  In theory, the patches should be, but history has shown theory and logic to be a poor predictor of future reality for Arduino code fixes.  As for AVRGCC and ACRLIBC, I can't imagine Arduino jumping from 4.3.3 all the way to 4.7.0.  We'll see what happens.
2  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.1i for Windows (installer, drivers, etc) +SRC on: October 27, 2012, 11:13:45 am
I'm still getting all the annoying compiler warning messages.  Most annoying is only initialized variables can be placed into program memory area.  When I do verbose compile, this fills several screens.  I've read that the latest AVR-GCC 4.7.0 and AVR-LIBC 1.8.0 are supposed to be rid of this erroneous compiler message.  See Andy Brown's write up and solution here http://andybrown.me.uk/wk/2012/04/28/avr-gcc-4-7-0-and-avr-libc-1-8-0-compiled-for-windows/.

Also, I saw that Arduino released some patches to fix all the bad type casting and other sloppy & amateur programming hacks in the official arduino libraries.  <rant>I can't begin to tell you how much the sloppy programming in the official cores/libraries annoys me.  Especially since most of them have been around for a long time.  I'm the amateur, I don't need my tools to be.</rant>  See issue 963 here http://code.google.com/p/arduino/issues/detail?id=963

Any chance these could be incorporated?  Or are they already incorporated and they just don't completely fix the problems?

Thanks,
3  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.1i for Windows (installer, drivers, etc) +SRC on: October 27, 2012, 02:07:11 am
Awesome! That fixed it.  Tested my sketches and the examples that were failing.  Everythnig compiles just fine in latest version.  Forced a few compile errors while I was at it and correct line numbers for compile errors is very nice.
4  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.1i for Windows (installer, drivers, etc) +SRC on: October 26, 2012, 08:59:17 pm
Just sent a sketch and libraries to the e-mail in your profile.
5  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.1i for Windows (installer, drivers, etc) +SRC on: October 26, 2012, 08:14:00 pm
OK.
1.0.1i_20121023 failed to compile sketches correctly with same errors in previous post.
1.0.1i_20121020 compiled everything sucessfully with no errors.

Your change log shows that you fixed the compiler line number error between these two revs.  How could that cause these errors?

Oh, and I'm not ready to give up on your ide just yet.  Way too many cool features.
6  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.1i for Windows (installer, drivers, etc) +SRC on: October 26, 2012, 07:52:15 pm
Bad news....Installed the latest build of ide 1.0.1i_20121026 this morning.  Now nothing will compile.  One example problem...Sketches with time library no longer compile.  Compile error is that time_t is not a valid type.  Also can't find all the type declarations and functions in Webduino.  Doesn't appear to be finding and/or linking the libraries correctly.  Also, compiler fails to find all functions that are defined after they are first called in sketches.  Very long lists of errors.  I uninstalled and reinstalled 1.0.1i and it still fails to compile.  The official 1.0.1 still compiles and runs these correctly.  Your version 1.0.1g_? also compiles and runs correctly.

The last version that was working for me was either 1.0.1i_20121019 or 1.0.1i_20121019.  Can't remember exactly which one it was.

Do you have a repository of past versions.  I'd like to load one of the previous builds of 1.0.1i and use that.
Found the old setup files.  Am back-revving to 20121023 and 20121020 versions.  Will let you know how they work.
7  Using Arduino / Programming Questions / Re: using snprintf_P in function on: October 24, 2012, 09:18:36 am
Problem solved!  Thanks for the expert help!
8  Using Arduino / Programming Questions / Re: using snprintf_P in function on: October 24, 2012, 07:27:58 am
@PaulS
That doesn't realy answer my question, but.... By returning the pointer to the memory location that was passed and modified in the function, I can use the funtion call in-line in the print statements.  This is the same way strcpy, strcat, etc all work.  They both modify a buffer and return a pointer to the buffer.

If I just modify the pointer to memory location, I then have to call the function in one statement and print the results of the modified buffer in the next statement.  For me, I like keeping it all on one line.  Does that help with the mystery?

@Groove
Doh!!! I believe you just nailed my problem.  The pointer obviously only has a length of one, which is exactly the length of my output.  Will correct.

Thanks.
9  Using Arduino / Programming Questions / using snprintf_P in function on: October 24, 2012, 07:01:03 am
I'm trying to write a function that will return a formatted time for output to serial, LCD, or webserver.  I created a function to return a pointer to a char array with a formated time in it.  I am having trouble getting snprintf_P to do my bidding when I use it in the function call.  I can make it work if I create a char array in the function, but I want it to work by passing a pointer to a char array and have the function return a pointer to the same char array.  I know that sounds confusing.  Probably simpler to see my example code below.

The example code below returns:
5
5:40:01 PM Oct 22, 2012


I expect it to return:
5:40:01 PM Oct 22, 2012
5:40:01 PM Oct 22, 2012


Any ideas why snprintf_P doesn't work as I expect it to in the first function call?

Code:
#include <Time.h>

//****************************************************************
void setup() {
  Serial.begin(115200);

  setTime(17,40,1,22,10,2012);  //setTime(hr,min,sec,day,mnth,yr)
  char timebuf[30];
  time_t tnow = now();
  Serial.println(format_tA(timebuf,tnow));
  Serial.println(format_tB(timebuf,tnow));
}

//****************************************************************
char* format_tA(char* t_bufA, time_t tA){
  snprintf_P(t_bufA,sizeof(t_bufA),PSTR("%d:%02d:%02d %s %s %d, %4d"),
             hourFormat12(tA),minute(tA),second(tA),(isPM(tA) ? "PM" : "AM"),
             monthShortStr(month(tA)),day(tA),year(tA));
  return t_bufA;
}

//****************************************************************
char* format_tB(char* t_bufB, time_t tB){
  char temp[30];
  snprintf_P(temp,sizeof(temp),PSTR("%d:%02d:%02d %s %s %d, %4d"),
             hourFormat12(tB),minute(tB),second(tB),(isPM(tB) ? "PM" : "AM"),
             monthShortStr(month(tB)),day(tB),year(tB));
  return strcpy(t_bufB,temp);
}

void loop() {
}
10  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.1i for Windows (installer, drivers, etc) +SRC on: October 20, 2012, 08:08:43 am
Personnaly, I'd like to request that the font stop changing.  Pick one and stick with it.  One way to fix this would be to add a drop down for font choice in the preferences tab.  If font choice was easy to change, people would be less enclined to complain and request changes.

Now that I've ranted a little, I'd like to compliment you on how much great stuff you've done with this.  Just sent you a donation.
11  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.1i for Windows (installer, drivers, etc) +SRC on: October 20, 2012, 04:15:51 am
I've noticed some strange behavior in tab navigating.  When I first open the ide and use the keyboard shortcur (CNTRL + ALT + Arrow) for moving between tabs, if jumps two tabs at a time (either direction you choose).

If I then go to the tab menu and select either next or previous tab from the menu, the keyboard shortcuts start working correctly and only move one tab at a time.

This behavior repeats every time I open the ide.  Also, I checked the official ide and it works correctly and does not do this.
12  General Category / General Discussion / Re: Arduino Due (released Oct 22, 2012) Compatibility on: October 05, 2012, 09:39:55 am
I just don't get the Due concept. I just feel I must be missing something obvious. Someone please explain it to me.

Surely, if I need more processor, then its because I'm doing something fundamentally unsuited to an operating system-less device like the Arduino. I.e., image processing, DSP, MP3 playing etc. If I need an OS I'd have Linux on a Raspberry Pi.

Arduino is a device for electronic hobbyists. 16 million things a second is faster than I've ever needed an Arduino to perform.


Surprised so much of this discussion has centered around the processor as apposed to I/O.

Due 96 MHz, 54 digital I/O, 16 Analog Inputs (assuming it's I/O is the same as Mega)
RPI  700 MHz, 17 digital I/O, 0 Analog Inputs

If your project involves a lot of low level I/O with any appreciable sensor timing and filtering, Due sure seems to make much more sense to me.  The quad/multi copter crowd and home energy monitor crowd are eager for the power.  Large amounts of I/O require rather expensive hardware to interfce to the RPI via USB or a multiplexor on I2C which is relatively slow.

I have a home energy monitor on a Mega that uses 44 digital lines and 8 analog.  Monitoring HVAC status/run time, water pressure, water pump usage, water heater run times. Have an ultrasonic sensor on the oil tank measuring fluid level.  Have sensors on the power lines coming in to the house calculating energy usage "real time".  All this is logging to a MySQL data base on the NAS.  Also monitoring eight wifi enabled thermostats.  I sends out a plethera of alerts via LAN when certain adverse conditions are met.  There are (4) Windows 7 machines in the house each banging away on the LAN wih their polluting flood of device discovery messages (arduino has to process all of these that are pointed at it) , and the ATT Uverse router banging away with DHCP status messaging.  The Mega can get pretty taxed.  I have isues with the fluid level sensor and power monitoring when all of these things manage to stack up on top of each other.  Could I do all this with a PC...yes, but every time I've looked into it, the cost gets excessive quickly.  My $50 Mega, $20 ethernet shield, and $20 in various opto isolators and resistors is much cheaper, plus it doesn't consume nearly the power the PC based system would.

From my perspective, RPI is a small personal computer, not a microprocessor for imbedded logic projects.  I don't need the USB ports, video support, or other peripherals on the RPI.  I'm near the front of the line for a Due.
13  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.1F for Windows (installer, drivers, etc) +SRC on: September 21, 2012, 04:08:01 pm
Another potential improvement...sure would be nice if the find/replace functionality could be made to search all tabs instead of just the current tab.
14  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.1F for Windows (installer, drivers, etc) +SRC on: September 20, 2012, 10:44:35 am
Did some more playing with this.  As long as you close the original blank session, at next start the ide appears to re-open however many sketches you had open so long as you quit by chossing File->Quit.  I have tested up to 12.  I opened 12 sketches, exited the ide by selecting File->Quit, then reopend the ide (by double clicking the desktopo shortcut for the ide app) and it reopened all 12 sketches in the last size location they were in when I quit.

If I then double click the desktop shortcut again (without first closing the 12 open windows), it will open 12 more windows exactly on top of the first 12.
15  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.1F for Windows (installer, drivers, etc) +SRC on: September 20, 2012, 09:36:12 am
What is that bug? I never recall arduino remembering the window position on startup :O

How to replicate/ what is the suggested behaviour?

Very old bug that has been identified for a long time.

See this archived issue/bug report
http://code.google.com/p/arduino/issues/detail?id=78

See this archived forum discussion
http://arduino.cc/forum/index.php?action=printpage;topic=100.0

Here is a simple test:
1. Open Arduino ide (official or yours)
2. Open a sketch and move/resize the window to your liking
3. Close the original window/blank sketch by clicking the red close button in upper right corner
4. In instance of the ide with your sketch, Go to the File menu and select Quit
5. Now reopen the ide

The ide will open with your last sketch already loaded in the last size/position.

Conversely, if you close the ide by clicking x button in upper right window corner, hitting Alt-F4, or right clicking the icon in window tray and selecting close, the ide will not remember sketch/size/position.

Suggested behavior
The suggested behavior is for ide to remember sketch/size/position (Exactly the same as it does if you select File->Quit) no matter how you choose to close the app.

Additional Data from my feeble investigation
The code and capability to remember window size/position and last sketch is already in the ide.  Unfortunately, it only works if you select Quit on the File menu.  Check the idesettings file and the parameters for last sketch/size/position are there.

last.sketch0.path=
last.sketch0.location=
last.sketch.count=

The behavior is...  If you select File->Quit it will update these parameters in the settings file.  The next time you open the app, it will read these parameters and open the last sketch/size/position.  If you then quit the app with a method other than File->Quit, it will not change the path or location parameters in the settings file, but it will set last.sketch.count to 0.  The next time you open the app it ignores the path and location parameters because count is set to 0.

There is also an additional set of parameters in the setting file...

last.sketch1.path=
last.sketch1.location=

When I manually set the last sketch count to 2 (last.sketch.count=2) in the settings file and open the ide, both of the sketches identified in last.sketch0 and last.sketch1 will open in their respective window size and position.

If I add an additional set of parameters for last.sketch2... and set last.sketch.count to 3, it will open all three sketches in their respective size/location.  Looks like someone was flirting with the idea of a recent sketch list on the file menu.
Pages: [1] 2