Open ForrestErickson opened 2 months ago
Hello Mr Lee!
I hope you are fine, sure, here is the last Wokwi project we created: https://wokwi.com/projects/390933163302682625
It was attached to the script versions, but since we used some libraries that are not available in Wokwi (like the eFLL library) we did not continue updating it. I hope it helps!
Best Regards,
Horacio García
@HJGV05 It appears that the EFLL libaray can be added through the WOKWI library manager.
and
I have copied the most current code into a new WOKWI at: https://wokwi.com/projects/405744143993619457
It fails to compile:
I assume this is due to the UNO Version 4 specific code (the analog reference) but am not certain.
I copied a working R4 WOKWI sketch from: https://wokwi.com/projects/398611563830221825 I compiled and ran it.
I added a line into setup, analogReference(AR_DEFAULT); // Internal reference
I confirmed the same error
I conclude that for the WOKWI environment the value AR_DEFAULT is not defined. I would guess that the underlying hardware for the Analog To Digital conversion is unlikely to be supported by WOKWI.
I made some changes as defined below, which allow it do compile; I interpret this as being either WOKWI does not today support the R4 at all, or we have not properly configured it to do so. (Please observed commented-out lines below! I do not assume this works; I just got it to compile. @ForrestErickson
`#elif defined(R4) //Configuration for Arduino UNO R4 // analogReference(AR_DEFAULT); // Internal reference analogReference(DEFAULT); // Internal reference delay(10); // Awaiting reference stability // float sensorValue = map(analogReference(), 0, 5.0, 0, 255.0); // Internal reference mapping float sensorValue = map(DEFAULT, 0, 5.0, 0, 255.0); // Internal reference mapping long vcc = (1000 1.1 1023) / sensorValue;
return vcc; }
void setup() {
// analogReadResolution(10); // analogReference(AR_DEFAULT);
Summary
A WOKWI Simulation or Simulations of the MoonRatII Version 2 PCB wiring my be of great value
Request
Have any of you created a schematic in WOKWI that has good fidelity to the MoonRatII Version 2 PCB ? Lee suspects there may be more than one. Can we share this work soon so? I hope to help Robert with the troubleshooting he is doing right now on a unit he hopes to take into the field very soon?
If there is already in this repository a WOKWI simulation please help me find it.
Thanks, Lee Erickson