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.
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.
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
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.
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]
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.
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,
Sure is. Lenny and Chris just consolidated everything here: https://github.com/flyonspeed
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.
Tom,
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.
Cheers,
Vac
Thx. I'll wait for Lenny.
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
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.
Tom,
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
Multiple libraries were found for "Audio.h"
Used: /Users/lenny/Documents/Arduino/libraries/Audio
Not used: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/Audio
Multiple libraries were found for "Wire.h"
Used: /Users/lenny/Documents/Arduino/libraries/Wire
Not used: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire
Using library i2c_t3 in folder: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/i2c_t3 (legacy)
Using library SD in folder: /Users/lenny/Documents/Arduino/libraries/SD (legacy)
Using library SdFat-beta-master at version 2.0.0-beta.2 in folder: /Users/lenny/Documents/Arduino/libraries/SdFat-beta-master
Using library SPI at version 1.0 in folder: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI
Using library Audio in folder: /Users/lenny/Documents/Arduino/libraries/Audio (legacy)
Using library Audio at version 1.3 in folder: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/Audio
Using library SerialFlash at version 0.5 in folder: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SerialFlash
Using library Gaussian at version 1.0.7 in folder: /Users/lenny/Documents/Arduino/libraries/Gaussian
Using library LinkedList at version 1.2.3 in folder: /Users/lenny/Documents/Arduino/libraries/LinkedList
Using library OneButton-master at version 1.2.0 in folder: /Users/lenny/Documents/Arduino/libraries/OneButton-master
Using library RunningMedian at version 0.1.15 in folder: /Users/lenny/Documents/Arduino/libraries/RunningMedian
Using library Wire in folder: /Users/lenny/Documents/Arduino/libraries/Wire (legacy)
Lenny
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, 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"
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.
Tom,
Are you on Windows or Mac? I'll set up a new install with the newest Arduino & Teensy loader to see if our code compiles on it.
Lenny, I'm on Win 10
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
There still must be a lot more to it than that: I did what you said. I also had to comment all these, because they are not in "here";
/*#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"
*/
Even with that I get this:
OnSpeedDac: In function 'void updateTones()':
OnSpeedDac:558: error: 'ONSPEED_BAND_HIGH' was not declared in this scope
} else if(AOA > (onSpeedAOA+ONSPEED_BAND_HIGH)) {
^
OnSpeedDac:564: error: 'ONSPEED_BAND_LOW' was not declared in this scope
} else if(AOA >= (onSpeedAOA-ONSPEED_BAND_LOW)) {
^
OnSpeedDac: In function 'void SensorRead()':
OnSpeedDac:1728: error: 'PFWD_BIAS' was not declared in this scope
Pfwd=GetPressurePfwd()-PFWD_BIAS;
^
OnSpeedDac:1729: error: 'P45_BIAS' was not declared in this scope
P45=GetPressureP45()-P45_BIAS;
^
OnSpeedDac:1739: error: 'flapDegrees' was not declared in this scope
flapsPos=flapDegrees[flapsIndex];
^
OnSpeedDac:1755: error: 'CAS_CURVE' was not declared in this scope
ASI=CAS_CURVE(ASI);
^
OnSpeedDac: In function 'void switchOnOff()':
OnSpeedDac:1982: error: 'AudioSampleEnabled' was not declared in this scope
voice1.play(AudioSampleEnabled);
^
OnSpeedDac:1998: error: 'AudioSampleDisabled' was not declared in this scope
voice1.play(AudioSampleDisabled);
^
OnSpeedDac: In function 'void LogReplay()':
OnSpeedDac:2074: error: 'flapDegrees' was not declared in this scope
for (unsigned int i=0; i < (sizeof(flapDegrees) / sizeof(flapDegrees[0]));i++)
^
OnSpeedDac:2086: error: 'PFWD_BIAS' was not declared in this scope
PfwdPascal=((PfwdSmoothed+PFWD_BIAS - 0.1*16383) * 2/(0.8*16383) -1) * 6894.757;
^
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]
return false;
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
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.
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.
That is all that was needed for full compilation. I agree about the VM.
Thx for all the help.
@tom Welcome, and thank you for helping us ironing out the bugs.
@Lenny So I bought the Teensy 3.6 and the ESP32 boards and they loaded up fine and the WIFI connection works.
Question. Does the WIFI antenna work from inside the aluminum enclosure? Seems like it couldn't. Don't have an enclosure yet.
Hi Tom,
The box is aluminum, but one of the small sides is plastic to allow the WiFi to work.
Cheers,
Vac
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 !!