I just started to fiddle with the XOD today.
I have put together a DHT11 three pin module with digital output and a QAPASS 16x2 LCD screen as a first attempt.
Hex address for the LCD is 0x27 by default. I have converted it to decimal as 39 and typed this in. XOD converted this to 39d upon save.
Now LCD displays “ERR” on both lines alternating with the values read from the DHT11.
What am I doing wrong? Any ideas?
Hard to know for sure without the patch you are using, but I would guess that invalid data is being fed to the LCD is why you are getting “ERR”. I think if you use debug mode to run the patch, wires with errors in the patch show up as red…might provide some clues.
You can also use 27h as the address to avoid converting to decimal (won’t fix your problem, but makes things easier).
thanks for the input.
Debug screen just says “Debug session started” without and return.
However, dht11-hygrometer node is flashing red and when I hover on it says “Node raised an error”
Simulation returned this;
"shared:ERROR: ‘/ws/arduino_data/packages/xod/tools/emscripten/1.39.2/bin/clang++ -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=1 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/ws/arduino_data/packages/xod/tools/emscripten/1.39.2/emscripten/system/include/libcxx -Xclang -isystem/ws/arduino_data/packages/xod/tools/emscripten/1.39.2/emscripten/system/lib/libcxxabi/include -Xclang -isystem/ws/arduino_data/packages/xod/tools/emscripten/1.39.2/emscripten/system/include/compat -Xclang -isystem/ws/arduino_data/packages/xod/tools/emscripten/1.39.2/emscripten/system/include -Xclang -isystem/ws/arduino_data/packages/xod/tools/emscripten/1.39.2/emscripten/system/include/libc -Xclang -isystem/ws/arduino_data/packages/xod/tools/emscripten/1.39.2/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isystem/ws/arduino_data/packages/xod/tools/emscripten/1.39.2/emscripten/system/local/include -DLLVM_ROOT=/ws/arduino_data/packages/xod/tools/emscripten/1.39.2/bin -DARDUINO_WASM_SIMULATION -DARDUINO_ARCH_WASM -O2 -std=c++11 -nostdlib -fno-exceptions -fno-rtti -c -I/tmp/arduino-sketch-4C565A7818ABF594A4A38D8E61A66FCA/sketch -I/ws/arduino_data/packages/xod/hardware/wasm/0.2.0/cores/simulation -I/ws/arduino_data/packages/xod/hardware/wasm/0.2.0/variants/simulation -DEMSCRIPTEN /tmp/arduino-sketch-4C565A7818ABF594A4A38D8E61A66FCA/sketch/sketch.ino.cpp -Xclang -isystem/ws/arduino_data/packages/xod/tools/emscripten/1.39.2/emscripten/system/include/SDL -c -o /dev/null -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr’ failed (1)"
Also, this was on top:
/ws/sketchbook/1e630318b25eed190437788a2c277b80f1aba26b9f0066dc7bc7b1aa57e75f6a/sketch/sketch.ino:978:10: fatal error: ‘Wire.h’ file not found
I am suspecting an incompatible Node in use here. What do you say?
Wire.h is pretty standard for Arduino IDE (and XOD) install…not sure why it can’t be found…
Don’t know what to make of the other error either…Sorry…
Make sure your
xod/__lib__ doesn’t have any xod* folders (xod, xod-dev, etc.). These would indicate that you modified a built-in node and it has now been saved…this also prevents updates when those libraries change later. If any exist, shutdown XOD and just delete the folder.
You could try un-installing XOD and re-installing. I don’t know if it will help, but gives you something else to try if nobody else responds.
I haven’t modified any libraries.
Checked all folders under xod/lib and there were not folders with an asterisk.
Also, I just have uninstalled and re-installed the XOD IDE. Did not help.
I have re-run the simulation and now bottom screen is stuck at:
“Something went wrong…” and re did it and the first error displayed as if <Wire.h> was missing.
I am puzzled.
I just added and interval of several seconds by a square wave generator and voila.
I guess the update frequency was too high for the LCD module.
I will look into this wire.h library thing nevertheless.
You are not looking for folders with a star. You are looking for folders that start with XOD that could have more characters after that.
I got you the first time. Just was not clear enough with my description I guess.
Take a look at the attached image please.
Those are the xod libraries included with the install. In the location where you are saving your projects (Likely c:\Users<username>\xod), there should be another
__lib__ folder. That one should not have xod, xod-dev, or xod-cloud folders. It should only have folders for libraries that you have added (like gweimer if you added one of my libraries).
Are you using Arduino or NodeMCU?
Have you tried to display in a watch node before display it in the LCD?
I had saved my first project other than the XOD’s prompted default Documents folder under Windows as this folder is backed up with MS One Drive and it annoys me.
There is no lib folder and hence are no libraries in my custom save folder at the moment and I wasn’t prompted for any settings related to it.
The default save location that you mentioned has xod-dev folder under the lib. Is this should not have been like this? I did not change any settings during the install at all.
Should I copy any libraries manually to my projects folder? Or should I save my projects under this folder to be safe?
I am using an Arduino Mega R3 clone.
I have been using the same MC and LCD without and problems with Arduino IDE for months.
I don’t know what is “trying to display in a watch node” as I have just started with XOD.
I will figure these in time I’m sure.
Meanwhile, thank you for your patience and support for this clueless rookie.
With watch node, before connecting to a LCD display, we can test whether our device is working correctly…
Oh I see.
Great. Will try this ASAP.
Thank you again.
That xod-dev folder under lib indicates XOD thinks you changed one of the xod-dev nodes and saved the changes. Delete that folder after closing XOD to return to using the latest built in XOD nodes. That might fix your current problem.
thanks for the guidance.
I am moving forward fast thanks to kind people like you and the intuitive interface of XOD.
I already have tried almost all of the Arduino compatible hardware components that I have which I have used with Arduino IDE.
Obviously there are differences in logics of operation but I like XOD a lot so far.
Even my eight year old have done great experiments with a number of sensors, even in combination.
XOD environment came as a savior for us during these hard times of global hardship.
Have you resolved yr original problem with LCD I2C 16x2 display?
Use a “clock” node with an interval of something above 2sec to pulse the DHT11 every 2 or more seconds. That will eliminate the ERR display.
I want to include a screen shot, but I don’t see how I can do it here (1st time post).
Hi, the new DHT node already includes a throttle node, you can raise the value from 0.2 to a larger one in case you have reading problems.