Closed Lu0z closed 5 years ago
some small changes, if using an AVR then custom prints must use flash strings, otherwise crashing
ex: out.printRaw(F("special prompt!"),len);
i'm sorry, i think i don't understand what you mean. also i'm now facing a brand new problem with incoming serial strings. as you may remember, this project is a readio transceiver based around an rf module ( which i'm really starting to hate) and the code was built for the V3 menu. At start up after the splash screen, a small amount of serial streams are sent to the module. the module responds with a special message that usually is ignored by the micro controller by my own coice. Everything worked flawlessly before. Now what happends is that whenever the module sends data back, it freezes the whole microcontroller. also i could not re-create this behavior into the serial monitor.
i was referring to fields print only, it might be a lot of stuff depending on the version you were using
I was checking your code, will have to replace LCD I2C with something else first (probably SSD1306) to check the fields stuff
about the streaming data, guess its this one https://github.com/neu-rah/ArduinoMenu/issues/189 no?
have you updated and set useAccel=false?
changed your code a bit to use serial input and ssd1306ascii output can enter fields like Tuning/Rx and Tuning/Tx
i'm using an arduino nano
is the problem related to serial input? i can watch serial output while i change the fields
about the streaming data, guess its this one #189 no?
It's a different issue now. in issue #189 i was talking about the menu being controlled numerical values received by the arduino trough serial. and causing some loping in the menu when the system was already running.
The thing i'm facing now is the whole firmware freezing when booting up the system.
Right after
void setup() {
There is the splash screen and module boot sequence composed of various serial streams for setting up the module on startup. There are three main data streams divided by a delay function.
Serial.print("AT+DMOCONNECT <CR><LF>"); // First stream resposne: +DMOCONNECT: 0 <CR><LF>
delay(500);
Serial.print("AT+DMOSETGROUP="); // Second stream response: +DMOCONNECT: 1<CR><LF>
Serial.print("0");
Serial.print(",");
Serial.print("134.0000");
Serial.print(",");
Serial.print("134.0000");
Serial.print(",");
Serial.print ("0000");
Serial.print(",");
Serial.print("0");
Serial.print(",");
Serial.print ("0000");
delay(500);
Serial.print("AT+ SETFILTER="); // Third stream. response: + DMOSETFILTER: 1<CR><LF>
Serial.print("0");
Serial.print(",");
Serial.print("0");
Serial.print(",");
Serial.print("0");
I also added comments with the expected responses by the module after the streams are sent
By putting some debugging code (some messages shown on my lcd) i understood that the after the first, right at the module's response the whole firmware froze. also all of the pins went to low.
i noticed that bucause the module went into transmit mode, since it needs a logical low from the MCU for that. Needless to say that the board became scortching hot HAHAHA. Also i hope it did get damaged since the antenna was not connected :/
for a moment i thought it was my encoder ping change.. but then i realized that I've not sent my code ufff
I am really sorry because i'm bothering you so much with this thing.
All of these problems pop up suddenly from nowhere.
Originally the thing was only about those crashes while using fields because i saw them while the mcu was mounted on the arduino board. But when i mounted the chip on the custom board i made and interfaced it with the module it alsto started to freeze on startup because of those data streams i told you.
I'm really losing my hopes to make this thing work properly i feel so defeated right now. i'm also having trobles with the module having difficulties receiveing actual radio signals. I must had been crazy when i thought about making this project...
I know the feeling, but code tends to compensate, great problem bring great rewards, let me know if I can help... chat room also help most of the time https://gitter.im/ArduinoMenu/Lobby
Thank you for your support, it means a lot to me :)
Do you have any idea on what's happening with those freeze / crashes? i'm still stuck i don't know what to do
i would start by using the raw mcu, without anything attached to it except the minimal (screen and encoder in your case?)
after that result i would know it its software or hw problem and move accordingly
we can continue to divide the software in block and repeat the process, divide and conquer ;)
Ok. So: using the raw mcu on the arduino board with only lcd and encoder attached ,only shows that crashing and resetting issue while selecting fields.
since there are no serial comunications in that state it boot correctly and runs good until you select a field in the "Tuning" page. I'm referring to Tx Freq Rx Freq Tx Subtone Rx Subtone Squelch Level Those are the objects that when selected cause the mcu to reset instantly.
The last object ( Ch. Space ) works perfectly, or at least it does not crash everything. also in the Filtering page everything works fine because there are only ON/OFF objects. So this makes me think that there is something stricly related to field objects. some kind of behavior that was fine in the V3 but causes some kind of fatal exception in V4. I think is not related to the custom field code, because RX subtone, Tx subtone and Squelch Level are just regular fields with nothing fancy on them.
I think this is a decent starting point.
what is your MCU and IDE?
My MCU is an ATMEGA328 PU the classic monolitic trough hole chip mounted on UNO Rev3
and i'm using the regular Arduino IDE v1.6.12
nothing weird
EDIT: i've noticed that my ide it's a bit outdated gonna update it right now.
ok, i've used an ATMega328 (arduino nano) but changed screen to SSD1306 (my I2C LCD is out of order i think) and instead of encoder input, i'm using serial input
any chance of updating the IDE? I am using 1.8.5 but not used it for the testings, was atom+platformio instead... will check with arduino IDE also
Hello. maybe i found a quick fix for the whole issue. In issue #189 i was referring to a problem while using the V3 version. Your solution was about a setting change in the V4 library, so i updated my library to the latest version and with that i started to also face the issues i told you in this discussion. Is there a way to fix issue #189 while using V3? I may easily roll back everything to V3 and then stay with that since it seems to be the last issue with my project and after that it should (hopefully) work right. Better fix a small problem with an old and tested version than two big in a newer version dont't yoyu think? :)
Hi!
on #189 there was an issue with received data being catch as menu accelerator and causing a loop, that option is only available on the latest v4.
nav.useAccel=false;
setting that on setup will make menu ignore accelerators, however when editing a field the numeric characters from the input will again be considered valid.
i suggest that you handle the incoming serial data, filter it and issue menu commands when appropriate, do not let serial be connected to menu input if its used for receiving data also.
I was unable to duplicate your issue with v4, so guess it is either related to data you bare receiving or some extra code that i was not using.
here my code, please pay attention to pin changes, i'm using an arduino nano and changed the output to an SSD1306AsciiWire instead of the LiquidCristal
feell free to send me more code details to sort this out
#ifndef ARDUINO_SAM_DUE
// #include <Wire.h>
#include <SSD1306Ascii.h>
#include <SSD1306AsciiWire.h>
#include <menuIO/SSD1306AsciiOut.h>
// #include <LiquidCrystal_I2C.h>//F. Malpartida LCD's driver
#include <menu.h>//menu macros and objects
// #include <menuIO/lcdOut.h>//malpartidas lcd menu output
#include <menuIO/encoderIn.h>//quadrature encoder driver and fake stream
#include <menuIO/keyIn.h>//keyboard driver and fake stream (for the encoder button)
#include <menuIO/chainStream.h>// concatenate multiple input streams (this allows adding a button to the encoder)
// #include <menuIO/serialOut.h>
#include <menuIO/serialIn.h>
using namespace Menu;
// LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address and pinout
#define I2C_ADDRESS 0x3C
SSD1306AsciiWire oled;
#define menuFont lcd5x7
#define fontW 5
#define fontH 8
// Encoder /////////////////////////////////////
#define encA A1
#define encB A2
//this encoder has a button here
#define encBtn A0
encoderIn<encA,encB> encoder;//simple quad encoder driver
#define ENC_SENSIVITY 4
encoderInStream<encA,encB> encStream(encoder,ENC_SENSIVITY);// simple quad encoder fake Stream
//a keyboard with only one key as the encoder button
keyMap encBtn_map[]={{-encBtn,options->getCmdChar(enterCmd)}};//negative pin numbers use internal pull-up, this is on when low
keyIn<1> encButton(encBtn_map);//1 is the number of keys
//input from the encoder + encoder button + serial
Stream* inputsList[]={&encStream,&encButton,&Serial};
chainStream<3> in(inputsList);//3 is the number of inputs
float TxFrq=134.0000;
float RxFrq=134.0000;
float ChSpVal=0.1250;
int ChSp=0;
int TxCTCSS=0;
int RxCTCSS=0;
int Squelch=0;
int PDEF=0;
int HPF=0;
int LPF=0;
template<typename T>
class customStepField:public menuField<T> {
public:
customStepField(const menuFieldShadow<T>& shadow):menuField<T>(shadow) {}
void doNav(navNode& nav,navCmd cmd) override {
switch(cmd.cmd) {
case upCmd:
customStep(1);
break;
case downCmd:
customStep(-1);
break;
default:
menuField<T>::doNav(nav,cmd);
break;
}
}
void customStep(T increment) {
T thisstep = increment*ChSpVal;//this using a custom step!
prompt::dirty=true;
if (thisstep < 0 && (target()-low()) < -thisstep) {
if (style()&wrapStyle) {
target() = high();
} else {
target() = low();
}
} else if (thisstep > 0 && (high()-target()) < thisstep) {
if (style()&wrapStyle) {
target() = low();
} else {
target() = high();
}
} else {
target() += thisstep;
}
}
Used printTo(navRoot &root,bool sel,menuOut& out, idx_t idx,idx_t len,idx_t panelNr) override {
//menuFieldShadow<T>& s=*(menuFieldShadow<T>*)shadow;
menuField<T>::reflex=target();
idx_t l=prompt::printTo(root,sel,out,idx,len);
bool ed=this==root.navFocus;
//bool sel=nav.sel==i;
if (l<len) {
out.print((root.navFocus==this&&sel)?(menuField<T>::tunning?'>':':'):' ');
l++;
if (l<len) {
l+=out.print(menuField<T>::reflex,4);//NOTE: this can exceed the limits!
if (l<len) {
l+=print_P(out,units(),len);
}
}
}
return l;
}
};
result Tune(eventMask e,navNode& nav,prompt& item) {
delay(500);
Serial.print("AT+DMOSETGROUP=");
Serial.print(ChSp);
Serial.print(",");
Serial.print(TxFrq,4);
Serial.print(",");
Serial.print(RxFrq,4);
Serial.print(",");
Serial.print ("00");
if (TxCTCSS < 10)
Serial.print ("0");
Serial.print (TxCTCSS);
Serial.print(",");
Serial.print(Squelch);
Serial.print(",");
Serial.print ("00");
if (RxCTCSS < 10)
Serial.print ("0");
Serial.print (RxCTCSS);
Serial.print ("<CR><LF>");
return proceed;
}
result Dispclear(eventMask e,navNode& nav,prompt& item) {
oled.clear();
return proceed;
}
//this can do the direct change on ChSpVal instead of the indirection
SELECT(ChSp,ChSpSel,"Ch. Space",Tune,noEvent,noStyle
,VALUE("12.5 KHz",0,Tune,enterEvent)
,VALUE("25 KHZ",1,Tune,enterEvent)
);
MENU(TUNING,"Tuning",doNothing,noEvent,noStyle
,altFIELD(customStepField,TxFrq,"Tx Freq","MHz",134.0000,174.0000,0,0,Tune,exitEvent,wrapStyle)
,altFIELD(customStepField,RxFrq,"Rx Freq","MHz",134.0000,174.0000,0,0,Tune,exitEvent,wrapStyle)
,FIELD(TxCTCSS,"Tx Subtone","",0,38,1,0,Tune,exitEvent,wrapStyle)
,FIELD(RxCTCSS,"Rx Subtone","",0,38,1,0,Tune,exitEvent,wrapStyle)
,FIELD(Squelch,"Squelch Level","",0,8,1,0,Tune,exitEvent,wrapStyle)
,SUBMENU(ChSpSel)
,EXIT("<Back")
);
result Filter(eventMask e,navNode& nav,prompt& item) {
delay(500);
Serial.print("AT+ SETFILTER=");
Serial.print(PDEF);
Serial.print(",");
Serial.print(HPF);
Serial.print(",");
Serial.print(LPF);
return proceed;
}
SELECT(PDEF,PDEFSel,"Pre/De Emph.",doNothing,exitEvent,noStyle
,VALUE("OFF",0,Filter,enterEvent)
,VALUE("ON",1,Filter,enterEvent)
);
SELECT(HPF,HPFSel,"Highpass",doNothing,exitEvent,noStyle
,VALUE("OFF",0,Filter,enterEvent)
,VALUE("ON",1,Filter,enterEvent)
);
SELECT(LPF,LPFSel,"Lowpass",doNothing,exitEvent,noStyle
,VALUE("OFF",0,Filter,enterEvent)
,VALUE("ON",1,Filter,enterEvent)
);
MENU(FILTERING,"Filtering",doNothing,noEvent,noStyle
,SUBMENU(PDEFSel)
,SUBMENU(HPFSel)
,SUBMENU(LPFSel)
,EXIT("<BACK")
);
MENU(mainMenu,"Main menu",Dispclear,exitEvent,wrapStyle
,SUBMENU(TUNING)
,SUBMENU(FILTERING)
,EXIT("<Back")
);
#define MAX_DEPTH 4
constMEM panel panels[] MEMMODE = {{0, 0, 128 / fontW, 64 / fontH}};
navNode* nodes[sizeof(panels) / sizeof(panel)]; //navNodes to store navigation status
panelsList pList(panels, nodes, 1); //a list of panels and nodes
idx_t tops[MAX_DEPTH] = {0, 0}; //store cursor positions for each level
#ifdef LARGE_FONT
SSD1306AsciiOut outOLED(&oled, tops, pList, 8, 2); //oled output device menu driver
#else
SSD1306AsciiOut outOLED(&oled, tops, pList, 5, 1); //oled output device menu driver
#endif
menuOut* constMEM outputs[] MEMMODE = {&outOLED}; //list of output devices
outputsList out(outputs, sizeof(outputs) / sizeof(menuOut*)); //outputs list
//macro to create navigation control root object (nav) using mainMenu
serialIn serial(Serial);
NAVROOT(nav, mainMenu, MAX_DEPTH, serial, out);
// MENU_OUTPUTS(out,MAX_DEPTH
// ,LCD_OUT(lcd,{0,0,20,4})
// ,NONE
// );
//
// NAVROOT(nav,mainMenu,MAX_DEPTH,in,out);//the navigation root object
result idle(menuOut& o,idleEvent e) {
Tune;
Filter;
if (e==idling){
oled.setCursor(0,0);
oled.print("Tx:");
oled.print(TxFrq,4);
oled.print("Mhz");
oled.setCursor(0,1);
oled.print("Rx:");
oled.print(RxFrq,4);
oled.print("Mhz");
}
return proceed;
}
void setup() {
pinMode(5, OUTPUT);
pinMode(encBtn,INPUT_PULLUP);
Serial.begin(115200);
while(!Serial);
encoder.begin();
// lcd.begin(20,4);
oled.begin(&Adafruit128x64, I2C_ADDRESS);
oled.setFont(menuFont);
nav.showTitle=false;
oled.setCursor(0, 0);
oled.print("Lambda-Caster VHF");
oled.setCursor(0, 1);
oled.print("Model: D105CH");
oled.setCursor(0, 2);
oled.print("FIRMWARE:");
oled.setCursor(0, 3);
oled.print("TransDriver v1.0");
delay(1000);
oled.clear();
oled.setCursor(0, 1);
oled.print("Booting rf module...");
Serial.print("AT+DMOCONNECT <CR><LF>");
delay(500);
Serial.print("AT+DMOSETGROUP=");
Serial.print("0");
Serial.print(",");
Serial.print("134.0000");
Serial.print(",");
Serial.print("134.0000");
Serial.print(",");
Serial.print ("0000");
Serial.print(",");
Serial.print("0");
Serial.print(",");
Serial.print ("0000");
delay(500);
Serial.print("AT+ SETFILTER=");
Serial.print("0");
Serial.print(",");
Serial.print("0");
Serial.print(",");
Serial.print("0");
nav.idleTask=idle;
nav.idleOn(idle);
nav.useAccel=false;
}
void loop() {
digitalWrite(5, HIGH);
if (ChSp==1){
ChSpVal=0.2500;
}
else{
ChSpVal=0.1250;
}
nav.poll();
}
#endif
BTW, have you updated the IDE? there are some issues with versions 1.6.x
and what is your free memory after compile?
Hi, i still have to understand this thing a little bit. But basically i don't need the data the module is sending back. If there is a way to make the firmware to totally ignore them that would be perfect. If there is no other way i think i will just cut the rx track away from the pcb and forget about that xD EDIT. I Could not work on anything lately since my pc's PSU decided to make a firework show just for me. I am currently waiting for a replacement...
but you need serial to control the menu? if not, just do not connect serial to menu input and its solved
the free memory thing is important, avr's behave bad on short memory... when you have your PSU back ofcoz
I don't need serial to control menu, but i'd like to keep serial in connected otherwise i will have to make some ugly cuts to the pcb to phisically disconnect it. I actually need the menu to ignore all the data coming from the module. Maybe in the future i may use that data for other things but the menu will be only controlled via button ls and encoder and it should ignore everything coming into the serial from other devices
I mean at software level, connections to serial are all good and feel free to use it for any purpose. however if the menu is not to be controler by serial interface we shoud not put the serial into the list of menu inputs
right now i'm out of my computer to check this, my ATI video board just quited....
will post some more details here, on my code the menu input is linked to serial by this line:
NAVROOT(nav, mainMenu, MAX_DEPTH, serial, out);
on your code:
//input from the encoder + encoder button + serial
Stream* inputsList[]={&encStream,&encButton,&Serial};
chainStream<3> in(inputsList);//3 is the number of inputs
just remove Serial from the list
//input from the encoder + encoder button
Stream* inputsList[]={&encStream,&encButton};
chainStream<2> in(inputsList);//2 is the number of inputs
please note that I've not compiled this
Right now i'm laughing like a maniac. I can't belive that such a tiny function was making all of that mess hahaha alright i will try it as soon as possible :) If you need to chose another gpu and dont't wanto to spend a lot but still having some good performance i suggest you a ge force gtx 750 TI. It's very cheap but it has 4gb of ram and comea already overclocked. Fun fact: my PSU died probably because it was just a 130w one and the GPU drains 65w on its own... Still that PSU kept up for like 3 years powering my rig on that configuration xD
Hey there, i've got some news! So, the code fix worked great, now the mcd does not pick up any serial from the module. but clearly for every fix i get a brand new Sh*t... firstly i noticed some weird disturbance while rotating my encoder and i'm still trying to understand if it's just the encoder or what. Basically what happens while rotating it isome times i hear an high pitched noise from the module into the speaker. The module seems to pick up noise from the serial and then it self-induces that into the speaker line ( applause to the engineer who designed it). at first i thought that the mcu was randomly shooting noise from the serial but it did it even when i set the sketch to use Serial.end after every serial cycle so i don't think that it's something like that. i also phisically changed my mcu to another brand new, still nothing. now i'm starting to belive that i'm facing some electro magnetic disturbances/ ground looping issues on the board since some times the menu start to behave on it's own like if i was operating the encoder. maybe the encoder is broken i don't know.
Anyway. i updated the IDE at 1.8 and guess what? yeah! new problem hahaha
The ide seems to complie real slowly and when it comes to write the chip, the process just freezes like if ti was writing tons of data into it. also the rx/tx leds on the board are off.
have you experienced this?
EDIT:
The ide started to give me some informations on what is happening.
C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Ricky\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Ricky\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10806 -build-path C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988 -warnings=none -build-cache C:\Users\Ricky\AppData\Local\Temp\arduino_cache_250698 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\Ricky\Documents\Arduino\LambdaCasterUI\LambdaCasterUI.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Ricky\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Ricky\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10806 -build-path C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988 -warnings=none -build-cache C:\Users\Ricky\AppData\Local\Temp\arduino_cache_250698 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\Ricky\Documents\Arduino\LambdaCasterUI\LambdaCasterUI.ino
Using board 'uno' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Warning: Board breadboard:avr:atmega328bb doesn't define a 'build.board' preference. Auto-set to: AVR_ATMEGA328BB
Detecting libraries used...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10806 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\sketch\\LambdaCasterUI.ino.cpp" -o nul
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10806 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\sketch\\LambdaCasterUI.ino.cpp" -o nul
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10806 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Users\\Ricky\\Documents\\Arduino\\libraries\\NewliquidCrystal" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\sketch\\LambdaCasterUI.ino.cpp" -o nul
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10806 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Users\\Ricky\\Documents\\Arduino\\libraries\\NewliquidCrystal" "-IC:\\Users\\Ricky\\Documents\\Arduino\\libraries\\ArduinoMenu-master\\src" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\sketch\\LambdaCasterUI.ino.cpp" -o nul
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10806 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Users\\Ricky\\Documents\\Arduino\\libraries\\NewliquidCrystal" "-IC:\\Users\\Ricky\\Documents\\Arduino\\libraries\\ArduinoMenu-master\\src" "-IC:\\Users\\Ricky\\Documents\\Arduino\\libraries\\PCINT-master\\src" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\sketch\\LambdaCasterUI.ino.cpp" -o nul
Using cached library dependencies for file: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src\Wire.cpp
Using cached library dependencies for file: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src\utility\twi.c
Using cached library dependencies for file: C:\Users\Ricky\Documents\Arduino\libraries\NewliquidCrystal\FastIO.cpp
Using cached library dependencies for file: C:\Users\Ricky\Documents\Arduino\libraries\NewliquidCrystal\I2CIO.cpp
Using cached library dependencies for file: C:\Users\Ricky\Documents\Arduino\libraries\NewliquidCrystal\LCD.cpp
Using cached library dependencies for file: C:\Users\Ricky\Documents\Arduino\libraries\NewliquidCrystal\LiquidCrystal.cpp
Using cached library dependencies for file: C:\Users\Ricky\Documents\Arduino\libraries\NewliquidCrystal\LiquidCrystal_I2C.cpp
Using cached library dependencies for file: C:\Users\Ricky\Documents\Arduino\libraries\NewliquidCrystal\LiquidCrystal_I2C_ByVac.cpp
Using cached library dependencies for file: C:\Users\Ricky\Documents\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SI2C.cpp
Using cached library dependencies for file: C:\Users\Ricky\Documents\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SR.cpp
Using cached library dependencies for file: C:\Users\Ricky\Documents\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SR1W.cpp
Using cached library dependencies for file: C:\Users\Ricky\Documents\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SR2W.cpp
Using cached library dependencies for file: C:\Users\Ricky\Documents\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SR3W.cpp
Using cached library dependencies for file: C:\Users\Ricky\Documents\Arduino\libraries\NewliquidCrystal\SI2CIO.cpp
Using cached library dependencies for file: C:\Users\Ricky\Documents\Arduino\libraries\ArduinoMenu-master\src\items.cpp
Using cached library dependencies for file: C:\Users\Ricky\Documents\Arduino\libraries\ArduinoMenu-master\src\menu.cpp
Using cached library dependencies for file: C:\Users\Ricky\Documents\Arduino\libraries\ArduinoMenu-master\src\menuBase.cpp
Using cached library dependencies for file: C:\Users\Ricky\Documents\Arduino\libraries\ArduinoMenu-master\src\menuIO\esp8266Out.cpp
Using cached library dependencies for file: C:\Users\Ricky\Documents\Arduino\libraries\ArduinoMenu-master\src\menuIO\jsonFmt.cpp
Using cached library dependencies for file: C:\Users\Ricky\Documents\Arduino\libraries\ArduinoMenu-master\src\menuIO\serialOut.cpp
Using cached library dependencies for file: C:\Users\Ricky\Documents\Arduino\libraries\ArduinoMenu-master\src\menuIO\xmlFmt.cpp
Using cached library dependencies for file: C:\Users\Ricky\Documents\Arduino\libraries\ArduinoMenu-master\src\menuIo.cpp
Using cached library dependencies for file: C:\Users\Ricky\Documents\Arduino\libraries\ArduinoMenu-master\src\nav.cpp
Using cached library dependencies for file: C:\Users\Ricky\Documents\Arduino\libraries\ArduinoMenu-master\src\plugin\barField.cpp
Using cached library dependencies for file: C:\Users\Ricky\Documents\Arduino\libraries\ArduinoMenu-master\src\plugin\cancelField.cpp
Using cached library dependencies for file: C:\Users\Ricky\Documents\Arduino\libraries\PCINT-master\src\pcint.cpp
Generating function prototypes...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10806 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Users\\Ricky\\Documents\\Arduino\\libraries\\NewliquidCrystal" "-IC:\\Users\\Ricky\\Documents\\Arduino\\libraries\\ArduinoMenu-master\\src" "-IC:\\Users\\Ricky\\Documents\\Arduino\\libraries\\PCINT-master\\src" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\sketch\\LambdaCasterUI.ino.cpp" -o "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Sto compilando lo sketch...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10806 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src" "-IC:\\Users\\Ricky\\Documents\\Arduino\\libraries\\NewliquidCrystal" "-IC:\\Users\\Ricky\\Documents\\Arduino\\libraries\\ArduinoMenu-master\\src" "-IC:\\Users\\Ricky\\Documents\\Arduino\\libraries\\PCINT-master\\src" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\sketch\\LambdaCasterUI.ino.cpp" -o "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\sketch\\LambdaCasterUI.ino.cpp.o"
Compiling libraries...
Compiling library "Wire"
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\Wire\Wire.cpp.o
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\Wire\utility\twi.c.o
Compiling library "NewliquidCrystal"
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\NewliquidCrystal\FastIO.cpp.o
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\NewliquidCrystal\LiquidCrystal_SR.cpp.o
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\NewliquidCrystal\LCD.cpp.o
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\NewliquidCrystal\I2CIO.cpp.o
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\NewliquidCrystal\LiquidCrystal.cpp.o
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\NewliquidCrystal\LiquidCrystal_I2C.cpp.o
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\NewliquidCrystal\LiquidCrystal_SR2W.cpp.o
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\NewliquidCrystal\LiquidCrystal_SR3W.cpp.o
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\NewliquidCrystal\LiquidCrystal_SI2C.cpp.o
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\NewliquidCrystal\LiquidCrystal_SR1W.cpp.o
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\NewliquidCrystal\SI2CIO.cpp.o
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\NewliquidCrystal\LiquidCrystal_I2C_ByVac.cpp.o
Compiling library "ArduinoMenu-master"
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\ArduinoMenu-master\menu.cpp.o
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\ArduinoMenu-master\menuBase.cpp.o
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\ArduinoMenu-master\items.cpp.o
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\ArduinoMenu-master\menuIo.cpp.o
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\ArduinoMenu-master\nav.cpp.o
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\ArduinoMenu-master\menuIO\xmlFmt.cpp.o
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\ArduinoMenu-master\menuIO\jsonFmt.cpp.o
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\ArduinoMenu-master\menuIO\esp8266Out.cpp.o
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\ArduinoMenu-master\menuIO\serialOut.cpp.o
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\ArduinoMenu-master\plugin\cancelField.cpp.o
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\ArduinoMenu-master\plugin\barField.cpp.o
Compiling library "PCINT-master"
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\PCINT-master\pcint.cpp.o
Uso il file precedentemente compilato: C:\Users\Ricky\AppData\Local\Temp\arduino_build_727988\libraries\PCINT-master\PCINT-master.a
Compiling core...
Using precompiled core: C:\Users\Ricky\AppData\Local\Temp\arduino_cache_250698\core\core_arduino_avr_uno_0c812875ac70eb4a9b385d8fb077f54c.a
Linking everything together...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988/LambdaCasterUI.ino.elf" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\sketch\\LambdaCasterUI.ino.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\Wire\\Wire.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\Wire\\utility\\twi.c.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\NewliquidCrystal\\FastIO.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\NewliquidCrystal\\I2CIO.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\NewliquidCrystal\\LCD.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\NewliquidCrystal\\LiquidCrystal.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\NewliquidCrystal\\LiquidCrystal_I2C.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\NewliquidCrystal\\LiquidCrystal_I2C_ByVac.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\NewliquidCrystal\\LiquidCrystal_SI2C.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\NewliquidCrystal\\LiquidCrystal_SR.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\NewliquidCrystal\\LiquidCrystal_SR1W.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\NewliquidCrystal\\LiquidCrystal_SR2W.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\NewliquidCrystal\\LiquidCrystal_SR3W.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\NewliquidCrystal\\SI2CIO.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\ArduinoMenu-master\\items.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\ArduinoMenu-master\\menu.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\ArduinoMenu-master\\menuBase.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\ArduinoMenu-master\\menuIO\\esp8266Out.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\ArduinoMenu-master\\menuIO\\jsonFmt.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\ArduinoMenu-master\\menuIO\\serialOut.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\ArduinoMenu-master\\menuIO\\xmlFmt.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\ArduinoMenu-master\\menuIo.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\ArduinoMenu-master\\nav.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\ArduinoMenu-master\\plugin\\barField.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\ArduinoMenu-master\\plugin\\cancelField.cpp.o" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988\\libraries\\PCINT-master\\PCINT-master.a" "C:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988/..\\arduino_cache_250698\\core\\core_arduino_avr_uno_0c812875ac70eb4a9b385d8fb077f54c.a" "-LC:\\Users\\Ricky\\AppData\\Local\\Temp\\arduino_build_727988" -lm
C:\Users\Ricky\Documents\Arduino\libraries\NewliquidCrystal\LiquidCrystal_I2C.cpp: In member function 'write4bits.constprop':
C:\Users\Ricky\Documents\Arduino\libraries\NewliquidCrystal\LiquidCrystal_I2C.cpp:283:1: internal compiler error: Segmentation fault
}
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper.exe: fatal error: C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc returned 1 exit status
compilation terminated.
c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: error: lto-wrapper failed
collect2.exe: error: ld returned 1 exit status
Uso la libreria Wire alla versione 1.0 nella cartella: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire
Uso la libreria NewliquidCrystal nella cartella: C:\Users\Ricky\Documents\Arduino\libraries\NewliquidCrystal (legacy)
Uso la libreria ArduinoMenu-master alla versione 4.10.2 nella cartella: C:\Users\Ricky\Documents\Arduino\libraries\ArduinoMenu-master
Uso la libreria PCINT-master alla versione 4.0.6 nella cartella: C:\Users\Ricky\Documents\Arduino\libraries\PCINT-master
exit status 1
Errore durante la compilazione per la scheda Arduino/Genuino Uno.
this happened during compiling
Hi! if you don't have physical pull up/down resistors on encoder pins you can activate the AVR pull-ups.
either initialize as INPUT_PULLUP
or call encoder.begin()
on setup
(i'm using an encoder with external pull-ups, so this parts were not included on my code, sorry)
on compiler error, it seems that you have broken compile tools
C:\Users\Ricky\Documents\Arduino\libraries\NewliquidCrystal\LiquidCrystal_I2C.cpp:283:1: internal compiler error: Segmentation fault
what about compiling original arduino examples, like blink?
f you don't have physical pull up/down resistors on encoder pins you can activate the AVR pull-ups.
i forgot about that, i edited my software earlyer today and i removed it by mistake. anyway i still have this noise sometime popping out for some reason. i'd like to try to run the code with 3 buttons instead of the encoder in order to test some stuff but i could not find an explaination on how to do that in the wiki. also i'm sticking with the v3 since it seems to work better for me.
on compiler error, it seems that you have broken compile tools what about compiling original arduino examples, like blink?
i will try as soon as i can
you are already using a button map (for the encoder), just add more buttons to that map
example: https://github.com/neu-rah/ArduinoMenu/blob/master/examples/btnNav/btnNav/btnNav.ino#L111
hello, new updates! I fixed the IDE's compiliing issue, it seems one of my mcu chips bricked and caused the IDE to freeze while loading the sketch into it. I've got a short video for you, showing that weird noise coing out from the amplifier stage when the encoder is set to a certain position. that thing is weird O.o
For what i understand it only does it in the tuning section of the menu while browsing the selections. in other sections and while selecting a value into a function it stays queiet.
I also noticed that the behaviour changed a bit after changing the IDE to the new version, before the update it also used to do it in menu idle mode and when exiting from menu to idle mode. Another thing that i'm supposing is that the noisy power supply is messing stuff up . i still have to test it on a clean and filtered 12v. i'm using a recovered universal wall plugged power supply and as you can see you can clearly hear a 50hz buzz from the power line. I tried to change the power supply and i found an even noisier one: it also started to send false input trough the encoder button input.
What do you think about that noise?
Hi! response was on gitter priv...
Hi! saw your video.. yeah, quite weird please tell me more about he project, what is it and what it does how audio is generated? what pins are you using?
can I help?
Hi there, i'm sorry i did not respond earlier, i started a evening school course a couple of weeks ago. I found the problem: basically the noise is because PIN5, the one controlling the push- to-talk, in those conditions starts to bounce from 1 to 0 randomly making the module open and close the transmission very quickly. The module then self induces the state switch peaks into the amp and that's how the speaker starts to scream. i guess that's is some conflict at ram level since the mcu has it full at over 70% and maybe the ide when compiling, sets some memory values to be in the same address at the same time, so it basically fights to have it at two different levels at the same time. i did not work to a fix yet but i guess that i could remove the PTT function from the program and just manage it trough hardware :)
was this related to the IDE? can we close or you still need help?
Hello again. i have noticed another little problem regarding fields. While navigating the menu, whenever i try to select a field, so not only the custom one we were talking about earlier, the firmware seems to crash and reset the chip. i think its' something with some changes made in the v4 since this did not happen in the old version. I also checked out the wiki in order to see if there are some syntax changes but it seems to be correct, the sketsh compiles perfectly and runs ok except fields.
Here is the piece of code regading the menu page containing pretty much al of the fields in the system.
do you see something wrong?
Thank you for you patience.