For working with the TFT display, I created two sample applications in the GitHub software repository:
1.) tft-stopwatch
This program is a simple stopwatch, controlled by the Mode, Enter, and Up keys to start, stop, and reset the time. The time runs with 3 digits millisecond resolution. It provides good feedback on the TFT refresh.
2.) tft-tempgraph
This program graphs the CPU temperature to the TFT. Together with the "stress" program, I use it to simulate CPU load, and check the heat development inside the enclosure when the lid is closed.
Example load generation with "stress", creating threads for 20 seconds:
pi@rpi0w:~/picon-one-sw/src/tft-hx8357d $ stress -c 2 -t 20 -v stress: info: [1810] dispatching hogs: 2 cpu, 0 io, 0 vm, 0 hdd stress: dbug: [1810] using backoff sleep of 6000us stress: dbug: [1810] setting timeout to 20s stress: dbug: [1810] --> hogcpu worker 2 [1811] forked stress: dbug: [1810] using backoff sleep of 3000us stress: dbug: [1810] setting timeout to 20s stress: dbug: [1810] --> hogcpu worker 1 [1812] forked stress: dbug: [1810] <-- worker 1812 signalled normally stress: dbug: [1810] <-- worker 1811 signalled normally stress: info: [1810] successful run completed in 20s
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.