With Lenny's help, I resolved my library conficts with Windows 10 Install.
Here's what worked for me:
What I did was copy the Audio library folder from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries to the C:\Users\<my name>\OneDrive\Documents\Arduino\libraries folder then overwrite the copied play_sd_raw.h and play_sd_wav.h with the files from the OnSpeed-Gen2-master library. Everything compiles now.
Your file path names will be different, of course.
I LOVE IT, didn't understand 5/8 of it but I still love it. Takes me back to when I bought my first computer and was playing around with machine language while working at Wang Laboratories. Can't wait to build mine and then have brain seizures trying to program it LMAO !!
@LennySo, I am experimenting with how things work with just the ESP, the Teensy and the serial between them connected with an SD card present. The web site comes up, and the commands "mostly" are seen by the ESP, but it doesn't seem to recognize LiveView. The following shows up on the console when I select Log Files, then LiveView, then Log Files:
...$STOPLIVEDATA!
$LIST!
...$STOPLIVEDATA!
$LIST!
...
It doesn't seem to recognize the LiveView command. It should print out
$STARTLIVEDATA!
but it does not and just shows trying to reconnect. It does retrieve the list of logged data files. You can re-boot, reformat the SD card etc.
@tom Yes, that's correct. Wifi sends a liveview command to the Teensy to start sending data when you pull the LiveView page on your web browser. Teensy then responds by sending 10Hz data via serial4 which is then sent to a Websocket so the browser can pick it up. If you have no pressure sensors connected the i2c buses lock up and you won't get any data.
I'll upload a log file to GitHub then you can put the Teensy into replay mode and you can check out how liveview works.
Guess I wasn't clear. By looking at the WIFI console, it looks like WIFI never sends out the Start Liveview command. It does send out the Stop Liveview when going to some other command like List.
Lenny, haven't Dionne this yet, but it looks like the right idea. I was sure there were missing files. In the same directory also is right. That's what the double quotes mean with a #include.
Lenny, thx. COMPLETE SUCCESS, OUT OF THE BOX. Arduino 1.87 and Teensyduino 1.48.
Did have to teach myself how to get many files from a sub-directory where there is no "clone" button on Github. Used Firefox add-on named "gitzip". It works well BTW.
The above success was for the Teensy code only. The update you made to Github for Teensy is much newer than the WIFI. Is it possible that a similar set of missing files exists for the WIFI code?
My compilation attempt says .h files are missing. I did all the prep to get the ESP32 Pico Kit.
Ok, I figured it out. It's the Teensy's Audio library that's causing the trouble. I installed (On Windows 7) the same versions of Arduino and Teensyduino you have and got the same error messages.
Go into C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio
Open these two files and delete or comment out all the lines in them:
play_sd_raw.cpp
play_sd_wav.cpp
I'm sure there's a more elegant solution to it but this will do the job for now.
Also, there's a LinkList library that I needed to add to one of the ReadMe files, download it if you don't already have it. It's needed by the Gaussian library.
OnSpeedDac: In function 'void calcAOA(float, float)':
OnSpeedDac:2254: error: 'flapDegrees' was not declared in this scope
if (flapsPos==flapDegrees[0])
^
OnSpeedDac:2257: error: 'FLAPSUP_AOA_CURVE' was not declared in this scope
AOAAvg+=FLAPSUP_AOA_CURVE(pCoeff);
^
OnSpeedDac:2264: error: 'FLAPSMIDDLE_AOA_CURVE' was not declared in this scope
AOAAvg+=FLAPSMIDDLE_AOA_CURVE(pCoeff);
^
OnSpeedDac:2271: error: 'FLAPSDOWN_AOA_CURVE' was not declared in this scope
AOAAvg+=FLAPSDOWN_AOA_CURVE(pCoeff);
^
OnSpeedDac: In function 'void SendDisplayData()':
OnSpeedDac:2283: error: 'VERTICAL_GLOAD_AXIS' was not declared in this scope
if (VERTICAL_GLOAD_AXIS[strlen(VERTICAL_GLOAD_AXIS)-1] =='X')
^
OnSpeedDac:2295: error: 'VERTICAL_GLOAD_AXIS' was not declared in this scope
if (VERTICAL_GLOAD_AXIS[0]=='-') gLoad=gLoad+2; // reverse accelerometer axis
^
OnSpeedDac:2316: error: 'flapDegrees' was not declared in this scope
flapsPercent=(float)flapsPos/(flapDegrees[sizeof(flapDegrees)/sizeof(int)-1]-flapDegrees[0])*100; //flap angle / flap total travel *100 (needed for displaying partial flap donut on display)
^
OnSpeedDac: In function 'int getFlapsIndex()':
OnSpeedDac:2353: error: 'flapPotPositions' was not declared in this scope
if (sizeof(flapPotPositions) / sizeof(flapPotPositions[0]) ==1) return 0;
^
OnSpeedDac:2359: error: 'flapPotPositions' was not declared in this scope
if (flapPotPositions[0]>flapPotPositions[(sizeof(flapPotPositions) / sizeof(flapPotPositions[0]))-1]) reverseOrder=true;
^
OnSpeedDac:2361: error: 'flapPotPositions' was not declared in this scope
for (i = 1; i < (sizeof(flapPotPositions) / sizeof(flapPotPositions[0])); i++)
^
OnSpeedDac: In function 'void setAOApoints(int)':
OnSpeedDac:2384: error: 'flapLDMAXAOA' was not declared in this scope
LDmaxAOA=flapLDMAXAOA[flapIndex];
^
OnSpeedDac:2385: error: 'flapONSPEEDAOA' was not declared in this scope
onSpeedAOA=flapONSPEEDAOA[flapIndex];
^
OnSpeedDac:2386: error: 'flapSTALLWARNAOA' was not declared in this scope
stallWarningAOA=flapSTALLWARNAOA[flapIndex];
^
In file included from C:\AOA_Gen2\OnSpeed-Gen2\Software\Teensy Code\OnSpeedDac\OnSpeedDac.ino:57:0:
C:\Users\Tom\Documents\Arduino\libraries\LinkedList-1.2.3/LinkedList.h: In instantiation of 'ListNode<T>* LinkedList<T>::getNode(int) [with T = Gaussian]':
C:\Users\Tom\Documents\Arduino\libraries\LinkedList-1.2.3/LinkedList.h:314:28: required from 'T LinkedList<T>::get(int) [with T = Gaussian]'
C:\Users\Tom\Documents\Arduino\libraries\Gaussian-1.0.7/GaussianAverage.h:90:26: required from here
C:\Users\Tom\Documents\Arduino\libraries\LinkedList-1.2.3/LinkedList.h:160:9: warning: converting 'false' to pointer type 'ListNode<Gaussian>*' [-Wconversion-null]
Those are generated from .wav files. This way they get loaded into the program space and we can play them quickly without needing to load them from the SD card. Only the Enabled/Disabled are currently being used.
Thx for the help. The biggest error I made was to not download ANY of the libraries during the teensy loader install the first time. There were so many there!! This time I took all of them and the problems I had reported are no longer causing any errors. That's good.
It still throws the errors below. Compiling at one speed, switching speeds and recompiling gives the same result. Doesn't report a gaussian error but maybe it had already quit. I could look at the verbose output, I guess.
arm-none-eabi-g++: error: CreateProcess: No such file or directory
Looks like you may be missing the ARM compiler from your Arduino install (arm-none-eabi-g++: error:). Make sure you are running Arduino 1.8.7 & Teensyduino 1.47.
If that's what you have and it still doesn't work try reinstalling Arduino, and then Teensyduino with all of its libraries. It should definitely compile.
Here's what my compiler says about libraries used and not used:
Multiple libraries were found for "SD.h"
Used: /Users/lenny/Documents/Arduino/libraries/SD
Not used: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SD
Not used: /Applications/Arduino.app/Contents/Java/libraries/SD
That should take care of the Audio compile issues too. Same as with the Wire.h "redirect", the fake audio library is there to rewrite some of the Teensy files that use SD.h. They don't compile with the SDFat_beta. It takes a little work, but it's worth it. The SDFat library has significantly less write latency.
Arduino caches some of the already compiled libraries. One way to have it rebuild all of them is to change the CPU speed to a different one, compile, set it back to 180Mhz and compile again.
There's also another compiler issue around Linklist+ Gaussian libaries. If I remember correctly it was just a compiler warning. If you need the modified libraries let me know and I'll upload them to Github.
Please keep us informed how it's going. If this library thing becomes an issue the plan is to create a virtual machine with Arduino and its libraries properly set up and the latest code loaded.
The email lenny@flyonspeed.org is bouncing for some reason, but you can message me here.
The "wire" redirect to i2c_t3.h means you have to go get one of those but which one? So, I picked nox771/i2c_t3. Then I got the SDFAT-Beta. The I2C compiled OK. The compile moved on to audio and really blows up. It needs a lot of "analyze", "control", "effect" etc .h files. But where do these come from?
At this point I think I am missing some instructions about the libraries needed.
You have passed my expertise! I’ll send a note to Lenny to have him chime in to this thread. If you don’t see a post, email him directly at lenny@flyonspeed.org.
With Lenny's help, I resolved my library conficts with Windows 10 Install.
Here's what worked for me:
What I did was copy the Audio library folder from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries to the C:\Users\<my name>\OneDrive\Documents\Arduino\libraries folder then overwrite the copied play_sd_raw.h and play_sd_wav.h with the files from the OnSpeed-Gen2-master library. Everything compiles now.
Your file path names will be different, of course.
Vern
I LOVE IT, didn't understand 5/8 of it but I still love it. Takes me back to when I bought my first computer and was playing around with machine language while working at Wang Laboratories. Can't wait to build mine and then have brain seizures trying to program it LMAO !!
Hi Tom,
The box is aluminum, but one of the small sides is plastic to allow the WiFi to work.
Cheers,
Vac
Glad that worked out.
You need to get the WebSockets library from here: https://github.com/Links2004/arduinoWebSockets
I thought that was included with the ESP32 board files, but it turns out it's someone else's work. I updated the Wifi code readme file on Github.
Let me know how that goes. I think I'll just create a VM with all this stuff installed to avoid these library and version issues in the future.
Tom,
Redownload everything from here, except the libraries folder: https://github.com/flyonspeed/OnSpeed-Gen2/tree/44d14ae00e9934e0fc139f7b10a57c6a454566e7/Software/Teensy%20Code
Those audio files are there. All of those files need to be in the same folder with OnSpeedDac.ino.
Lenny
Ok, I figured it out. It's the Teensy's Audio library that's causing the trouble. I installed (On Windows 7) the same versions of Arduino and Teensyduino you have and got the same error messages.
Go into C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio
Open these two files and delete or comment out all the lines in them:
play_sd_raw.cpp
play_sd_wav.cpp
I'm sure there's a more elegant solution to it but this will do the job for now.
Also, there's a LinkList library that I needed to add to one of the ReadMe files, download it if you don't already have it. It's needed by the Gaussian library.
Lenny
Lenny, I'm on Win 10
Lenny, still no-go. Where do these come from:
#include "AudioSampleEnabled.h"
#include "AudioSampleDisabled.h"
#include "AudioSampleCalibrate_flapsdown.h"
#include "AudioSampleCalibrate_flapsup.h"
#include "AudioSampleCalibration_canceled.h"
#include "AudioSampleCalibration_mode.h"
#include "AudioSampleCalibration_saved.h"
Lenny,, thx again. The other project I'm working on is for an Arduino Due (an ARM target) and it compiles & executes fine.
I am running Arduino 1.8.10 and teensyduino 1.48. Do I really need to regress these versions?
Lenny,
Thx for the help. The biggest error I made was to not download ANY of the libraries during the teensy loader install the first time. There were so many there!! This time I took all of them and the problems I had reported are no longer causing any errors. That's good.
It still throws the errors below. Compiling at one speed, switching speeds and recompiling gives the same result. Doesn't report a gaussian error but maybe it had already quit. I could look at the verbose output, I guess.
arm-none-eabi-g++: error: CreateProcess: No such file or directory
Multiple libraries were found for "SD.h"
Used: C:\Users\Tom\Documents\Arduino\libraries\SD
Not used: C:\Program
Not used: C:\Program
Multiple libraries were found for "SdFat.h"
Used: C:\Users\Tom\Documents\Arduino\libraries\SdFat-beta
Multiple libraries were found for "SPI.h"
Used: C:\Program
Multiple libraries were found for "Audio.h"
Used: C:\Users\Tom\Documents\Arduino\libraries\Audio
Not used: C:\Program
Multiple libraries were found for "analyze_fft256.h"
Used: C:\Users\Tom\Documents\Arduino\libraries\Audio
Not used: C:\Program
Multiple libraries were found for "i2c_t3.h"
Used: C:\Program
Error compiling for board Teensy 3.6.
I don't have a separate i2c library, we are using the one that comes with the Teensy Loader. Download it from here: https://www.pjrc.com/teensy/loader.html
That should take care of the Audio compile issues too. Same as with the Wire.h "redirect", the fake audio library is there to rewrite some of the Teensy files that use SD.h. They don't compile with the SDFat_beta. It takes a little work, but it's worth it. The SDFat library has significantly less write latency.
Arduino caches some of the already compiled libraries. One way to have it rebuild all of them is to change the CPU speed to a different one, compile, set it back to 180Mhz and compile again.
There's also another compiler issue around Linklist+ Gaussian libaries. If I remember correctly it was just a compiler warning. If you need the modified libraries let me know and I'll upload them to Github.
Please keep us informed how it's going. If this library thing becomes an issue the plan is to create a virtual machine with Arduino and its libraries properly set up and the latest code loaded.
The email lenny@flyonspeed.org is bouncing for some reason, but you can message me here.
Lenny
OK, so I got the clone of all that. First of all should it compile out of the box?
I followed the library instructions at: https://github.com/flyonspeed/OnSpeed-Gen2/tree/44d14ae00e9934e0fc139f7b10a57c6a454566e7/Software/Teensy%20Code/libraries
The "wire" redirect to i2c_t3.h means you have to go get one of those but which one? So, I picked nox771/i2c_t3. Then I got the SDFAT-Beta. The I2C compiled OK. The compile moved on to audio and really blows up. It needs a lot of "analyze", "control", "effect" etc .h files. But where do these come from?
At this point I think I am missing some instructions about the libraries needed.
Hi Tom,
Sure is. Lenny and Chris just consolidated everything here: https://github.com/flyonspeed