I started developing a telemetry visualization tool around half a year ago but never got around to making a post on my blog. This tool makes it easy to chart data received over a UART. Line charts, Fourier transforms, histograms and dials (gauges) are currently supported. The main goal was to be able to plot large amounts of data, live, without requiring a very powerful CPU or GPU. With antialiasing enabled, I'm currently able to plot around 600,000 points, at 4k60, with a mobile Core i7 (and no discrete GPU.) With antialiasing disabled, I can more than double that.
Since there are no blog posts for v0.2 and v0.1, I'll list the changelog and demo videos for all three versions:
Telemetry Viewer v0.3 Changelog (2017-02-11)
Added manual ranging (the y-axis) to Time Domain Charts.
Added manual ranging (the power axis) to Frequency Domain Charts.
Added new Waveform and Waterfall views to Frequency Domain Charts. These visualize the frequency domain's history over a period of time.
Added manual domains (the x-axis) and autoscaled-but-fixed-center domains to Histogram Charts.
Added manual ranging (the y-axis) to Histogram Charts.
Added y-axis scale choices to Histogram Charts: relative frequency, frequency, or both.
Added user-specified bin counts to Histogram Charts.
Added manual ranging to Dial Charts.
Added the ability to remove statistics from Dial Charts.
New Quaternion Chart to visualize orientation (rotation in three dimensions.)
For line charts, if you are zoomed-in enough that there are relatively few points on screen, dots are now rendered at each point.
Automatic logging has been removed and replaced with an "Export CSV Log" button.
Added support for high-resolution scrolling when using certain Logitech mice, such as the M705.
Various small bug fixes. See the git commit log for more details.
Telemetry Viewer v0.3 Demo Video
Telemetry Viewer v0.2 Changelog (2016-11-24)
Ported / rewrote all charts for OpenGL. Massive speed improvements. No longer using JFreeChart.
Added automatic logging to "log.csv"
Added timeshifting: use your scroll wheel to rewind and fast-forward through time.
Added zomming: use your scroll wheel while holding down Ctrl to zoon in and out.
Added display scaling: use your scroll wheel while holding down Shift to make fonts/lines/etc bigger or smaller.
Added ability to remove specific charts by clicking on an "X" at the top-right corner of a chart.
Added a "Help" button with a brief user guide.
Various small bug fixes. See the git commit log for more details.
Telemetry Viewer v0.2 Demo Video
Telemetry Viewer v0.1 Changelog (2016-09-27)
Initial release.
Five chart types: Time Domain, Time Domain Cached, Frequency Domain, Histogram, and Statistics.
The Time Domain, Frequency Domain and Histogram charts used the JFreeChart library, the others were written by me.
I've been using a Raspberry Pi as a low-cost/low-power server for the past couple years. This post is my short collection of notes related to setting up a Pi as a web server with the classic "LAMP" stack (Linux, Apache, MySQL, PHP.)
Unzip the Raspbian archive and use Win32DiskImager to write the .img to an SD card. To run Win32DiskImager, you might to Right Click -> Run as Administrator. When the write completes, place the SD card in the Pi and plug in ethernet and micro USB cables. There is no need for a keyboard, mouse or monitor.
Connect to the Pi via SSH
Use your router to figure out the Pi's IP address and optionally setup the router to assign the Pi a static IP address. Run TeraTerm and start a SSH connection to that IP address. The default username is "pi" and the default password is "raspberry".
Optionally change the hostname by replacing all instances of "raspberrypi" with a new hostname:
sudo nano /etc/hostname
sudo nano /etc/hosts
Optionally change the username by replacing all instances of "pi" with a new username:
sudo -s
nano /etc/passwd (change the username AND home dir)
nano /etc/shadow
nano /etc/group
nano /etc/gshadow
nano /etc/sudoers
mv /home/pi /home/newusername
passwd newusername
shutdown -r now
Reopen TeraTerm and login with the new username and password.
Configure Raspbian and Install Software Updates
Run raspi-config to setup the OS:
sudo raspi-config
Expand the filesystem
Set boot options to "B1 Console"
Optionally set internationalization options to "en_US" and set the timezone
Finish and let it reboot
At this point it's all up and running. Going to the Pi's IP address in a web browser should reveal the default Apache page. That page is stored in /var/www/html/index.html, and also accessable through the link you made as ~/html/index.html. Assuming you want the web server to be public, you probably want to setup port forwarding on your router (TCP port 80) and use a domain name and dynamic DNS service so people can type in a .com instead of an IP that might change over time.
I use Google Domains. It's around $12/year for a .com and they include dynamic DNS service at no extra cost. Here's how to setup the dynamic DNS service they offer:
Login to https://domains.google.com/
In the rows of domain names, click on the DNS icon for the domain you want to setup
In the Synthetic Records section, select Dynamic DNS
For the subdomain, use "@" (without the quotes) for no subdomain (like when someones goes to yourdomain.com instead of www.yourdomain.com)
Then make another record for the "www" (without quotes) subdomain
Click on the > icon next to each record, then click View Credentials
You can use software like ddclient to notify Google when your IP changes, or you can keep things simple and just visit a specially-crafted URL periodically to keep Google up-to-date. I wrote a simple script to visit that URL and record it's response to a text file. Be sure to make the script executable:
The script downloads the web pages to the text file (the first wget creates the text file, the second wget appends to the text file) and then I also append the current date and time to the text file.
Setup a cron job to run the script at the start of every hour:
crontab -e
0 * * * * ~/dns_update_script.sh
Using Virtual Hosts to Serve Multiple Domains
A single computer can serve multiple domains. Apache supports this and calls it a "Virtual Host." You can repeat the following steps for as many domains as needed:
After installing Swish-SFTP, there will be a "Swish" device listed in File Explorer > This PC. Double-click it, then choose "Add SFTP Connection" near the top of the window. After making a connection you can drag-and-drop files between Windows and the Pi.
That's it. You now have a web server that requires less than 5 watts of power to run, and occupies hardly any space in your home.
YouTube Video
I also made a YouTube video showing the process. In the video I did not cover Virtual Hosts.