Philip Edwards

@philipedwards.bsky.social

Developer, Game Dev. Working with Unreal. I dabble with Godot, Arduino and Raspberry Pis. Australian. Current projects: - Automatic Sky Tracking Telescope - Rush Hour - Vehicle Animator for Unreal Engine https://www.gdcorner.com/

This was also important since to meet the target slew speed I want, i need to step the motors every 150us, so needed around 10,000 loop it/s. The main problem blocking this was i2c communications with the accelerometer and magnetometer.

Philip Edwards@philipedwards.bsky.social · 2mo ago

Loop iterations: - Added a few simple metric gathering variables - Loop count resetting every 1000ms - Loop count buckets for 100ms within the 1000ms time - An array tracking the 10 largest individual loop times per 1000ms bucket

Performance week! Last Tuesday pings/sec was 73, while the startup time was 1.1 seconds, and the loop it/s was unknown. Today: - Pings/sec 7100+ - Startup time ~0.11 seconds - Loop it/s ~67,000 (target of 10,00) A few things went into this:

Telescope benchmark showing a message throughput on serial communications with 7132 pings per second throughputLog from telescope benchmark showing MCU boot ready time of 0.12 secondsLog from telescope MCU showing 65,924 loop iterations a second

To hit the desired slew speed on the telescope I need the steppers to step every ~150us. That means I need to be able to step the drivers 10,000 times a second with no stalls. I think this is possible. Otherwise I have in mind an ISR based approach that should work also.

Been tinkering with my telescope project the past few weeks. Almost finished converting the controller board from Arduino Mega to Pico. Currently wrestling with moving from breadboard to PCB. This will be my first PCB, and I think I might be in the deep end!

KiCad schematic of a Raspberry Pico MCU and several modules including 2 TMC2209 stepper drivers, an oled screen, GPS module and accelerometer/magnetometer

Finally got back into my telescope project last night. Have an initial version of the firmware ported from Arduino Mega2560 to RPi Pico. Missing some features, but most of the kinks and incompatibilities seem to be ironed out. Next step is writing new stepper code for TMC2209 drivers.

PlatformIO log if successful build of firmware for StargazeController

Why are long lists so terrible online? Take a music playlist, it loads 20-30 songs at a time, and then you need to scroll to the bottom, and wait for the next batch to load. Just implement virtual scroll ffs. Count the items in the playlist, let me scroll to the real end, and then batch load that.