Some times ago I tested a magnetic levitation project with Arduino-code and had the dream to do that with Annex32 as well.
So I did find now the possibilities and limitations of an interpreter based language and I have to confess that the final inflight time was only about 10 seconds.
BUT IT WORKS! as you can see here:
or as a video : https://vimeo.com/521144739
I used this schematic with a HALL-sensor, a M5 Atom lite (= ESP32pico) an electromagnet and some strong stacked permanent magnets in the "payload" :
The electromagnet is a modified 5V-relay with a 3v3-input. Schematic and modification are described _here_
The ANNEX32-code is very minimalistic for max performance. As the interpreter causes some "jitter" I did not manage to keep the "payload" in the air for more than 10 s.
Any ideas for making this code faster and jitter free are very welcome. My final idea is to deactivate the WIFI now .
But I guess that I have reached the speed limits of the interpreter
Code: [Local Link Removed for Guests]
bluetooth.delete
wlog can.stop
spi.stop
pin.mode 23, output
do
if adc(33)> 2543 then
pin(23)=0
else
pin(23)=1
endif
loop
end