Am I correct arduino.h vs wprogram

I'm working on a full color game system that utilizes most arduino units but is directed at esp32 and teensy. At the moment I'm trying to work on the esp32 part but I'm having trouble getting the buttons work. I usually use bounce but the esp32 arduino core does not include wprogram. So I looked up what exactly wprogram does and read the lil history thing that talks about replacing it with arduino.h.

It compiles just find though I haven't tested it. Mainly due to not wanting to run around in circles.

Would using arduino.h be my workaround since esp32 uses that over wprogram. Any thing you might be able to think of that might hinder my progress

Everything uses Arduino.h instead of WProgram.h and has for years. If code with #include <WProgram.h> has been compiling for you then you’re either using an ancient version or modified.

Note that the correct spelling of the file is Arduino.h, not arduino.h. The latter will work on a filename case insensitive OS such as Windows but not on a case sensitive one.

Also note that any library that includes WProgram.h is ancient so it’s worth looking around to see if there is a newer, improved version available. That’s not to say you shouldn’t use an old libraries if there has been no recent work on it.

Teensy still has wprogram in thier library believe it or not. I've been using thier version of bounce which is prolly old as snot but it was working.

I can't figure out how to make bounce2 rebounce which is needed for continuous movement or what ever when the button is held. So I can just use the bounce1 with Arduino.h instead of Wprogram.h

OK, that makes sense, I assumed you were talking about an official hardware package. My guess is teensy has WProgram.h and Arduino.h, which is the only smart thing to do and super easy. It was such a dumb move for Arduino to break all old libraries when it could have been avoided so easily. I think the developers would not do something like that these days.

Awesome!!!!! Thank you!!! That was a load of help!!!!! Will save a lot of time!!!

pert: OK, that makes sense, I assumed you were talking about an official hardware package. My guess is teensy has WProgram.h and Arduino.h, which is the only smart thing to do and super easy. It was such a dumb move for Arduino to break all old libraries when it could have been avoided so easily. I think the developers would not do something like that these days.

Yes, Paul added some extras to his teensyduino that not only improves some things but also helps fix some of the official IDE's shortcomings. Many of these improvements & fixes have been offered to the Arduino core team to be put into the official IDE release but some like the pre 1.x backward compatibility header file fixes and the much faster digital i/o routines have been rejected.

The Arduino.h vs WProgram.h débâcle you can thank Dave Mellis and Massimo Banzi for this decision. There were several of us that pleaded with them not to do this, but in the end they knowingly and consciously made the decision to break 100% of ALL 3rd party s/w rather than include a few extra header files that would have worked on the bulk of the s/w to provide backward compatibility to allow for a transition period. (some things like the change of the Print class virtual functions had no work around) Their argument was that by breaking everything, it will resolve the situation quicker as everyone will be forced to fix their code.

Reality is that it took many years to recover from this and the issue still rears its ugly head from time to time.

In my opinion the worst part of it was that they made this as a last minute change in between the final Arduino 1.0 release candidate and the actual Arduino 1.0 release -with no interim release of any kind - nor with any sort of notice to or comment from the general Arduino community. That is not how s/w is normally developed and released. i.e. you don't break the entire world between a release candidate and a final release.

They almost made a similar decision when the libraries were transitioning to the newer 1.5x format. The original design and plan was that it would not be backward compatible with existing 1.x libraries. So just think about that for a moment: a few years after the 1.0 fiasco of breaking 100% of all the 3rd party code, it was about to happen again with the 3rd party libraries. Paul Stoffregen and I were going back and forth with the core Arduino team at the time trying to convince them not to abandon all the existing 1.x libraries and getting nowhere. They were dead set on not preserving any 1.x library backward compatibility. After many long conversations with Cristian Maglie, who was a newcomer to the Arduino development team at the time, I finally realized that the Core Arduino team had no idea the impact of their decisions on the overall community and in particular 3rd party library authors. They had the luxury of always leaving the past behind with each of their IDE release and starting with a clean slate, but the 3rd party world doesn't work that way. Once I finally got through to Cristian about this difference, he jumped on board with support for backward compatibility for 1.x libraries. He even overrode Dave Mellis on this. And THAT is how/why we have 1.x support in the current Arduino IDE. It was nearly a deja-vu

To this day I think the only reason it happened this way is because Cristian was doing the bulk if not all the work on it, so Dave let it go as he wasn't doing the work to make it happen vs he actually had a change of mindset.

--- bill