The Heat Of The Moments – Location Visualization In Python

Have you ever taken a look at all the information that Google has collected about you over all these years? That is, of course, assuming you have a Google account, but that’s quite a given if you own an Android device and have privacy concerns overruled by convenience. And considering that GPS is a pretty standard smartphone feature nowadays, you shouldn’t be surprised that your entire location history is very likely part of the collected data as well. So unless you opted out from an everchanging settings labyrinth in the past, it’s too late now, that data exists — period. Well, we might as well use it for our own benefit then and visualize what we’ve got there.

Location data naturally screams for maps as visualization method, and [luka1199] thought what would be better than an interactive Geo Heatmap written in Python, showing all the hotspots of your life. Built around the Folium library, the script reads the JSON dump of your location history that you can request from Google’s Takeout service, and overlays the resulting heatmap on the OpenStreetMap world map, ready for you to explore in your browser. Being Python, that’s pretty much all there is, which makes [Luka]’s script also a good starting point to play around with Folium and map visualization yourself.

While simply just looking at the map and remembering the places your life has taken you to can be fun on its own, you might also realize some time optimization potential in alternative route plannings, or use it to turn your last road trip route into an art piece. Just, whatever you do, be careful that you don’t accidentally leak the location of some secret military facilities.

[via r/dataisbeautiful]

Circuit Simulation In Python

Using SPICE to simulate an electrical circuit is a common enough practice in engineering that “SPICEing a circuit” is a perfectly valid phrase in the lexicon. SPICE as a software tool has been around since the 70s, and its open source nature means there are more SPICE tools around now to count. It also means it is straightforward enough to use with other software as well, like integrating LTspice with Python for some interesting signal processing circuit simulation.

[Michael]’s latest project involves simulating filters in LTspice (a SPICE derivative) and then using Python/NumPy to both provide the input signal for the filter and process the output data from it. Basically, it allows you to “plug in” a graphical analog circuit of any design into a Python script and manipulate it easily, in any way needed. SPICE programs aren’t without their clumsiness, and being able to write your own tools for manipulating circuits is a powerful tool.

This project is definitely worth a look if you have any interest in signal processing (digital or analog) or even if you have never heard of SPICE before and want an easier way of simulating a circuit before prototyping one on a breadboard.

A Python Serial Terminal To Get You Out Of A Jam

When fiddling around with old computers, you can occasionally find yourself in a sticky situation. What may be a simple task with today’s hardware and software can be nearly impossible given the limited resources available to machines with 20 or 30 years on the clock. That’s where [bison] recently found himself when he needed to configure a device over serial, but didn’t have any way of installing the appropriate terminal emulator on his Fujitsu Lifebook C34S.

His solution, since he had Python 2.6 installed on the Debian 6 machine, was to write his own minimal serial terminal emulator. He intended for the code to be as terse as possible so it could be quickly typed in, should anyone else ever find themselves in need of talking to a serial device on Linux but can’t get screen or minicom installed.

The code is very simple, and even if you never find yourself needing to fire up an impromptu terminal, it offers an interesting example of how straightforward serial communications really are. The code opens up the /dev/ttyS0 device for reading, and after appending the appropriate return character, pushes the user’s keyboard input into it. Keep looping around, and you’ve got yourself an interactive terminal.

With this program written, [bison] was able to connect the 266 MHz C34S to his Retro WiFi SI, a modem adapter that bridges the gap between a vintage computer and modern wireless network. Gadgets like these allow you to browse BBSes as the creator intended, and can be fashioned with nothing more exotic than an ESP8266 running some open source code.

KiCad Action Plugins

The last two years has been a particularly exciting time for KiCad, for users, casual contributors, and for the core developers too. Even so, there are many cool new features that are still in process. One bottleneck with open-source development of complex tools like KiCad is the limited amount of time that developers can devote for the project. Action plugins stand to both reduce developer load and increase the pace of development by making it easier to add your own functionality to the already extensible tool.

Sometime around version 4.0.7 (correct us if we’re wrong), it was decided to introduce “action plugins” for KiCad, with the intention that the larger community of contributors can add features that were not on the immediate road map or the core developers were not working on. The plugin system is a framework for extending the capabilities of KiCad using shared libraries. If you’re interested in creating action plugins, check out documentation at KiCad Plugin System and Python Plugin Development for Pcbnew. Then head over to this forum post for a roundup of Tutorials on python scripting in pcbnew, and figure out how to Register a python plugin inside pcbnew Tools menu. Continue reading “KiCad Action Plugins”

Sensing, Connected, Utility Transport Taxi For Level Environments

If that sounds like a mouthful, just call it SCUTTLE – the open-source mobile robot designed at Texas A&M University. SCUTTLE is a low cost (under $350) robot designed for teaching Aggies at the Multidisciplinary Engineering Technology (MXET) program, where it is used for in-lab lessons and semester projects for the MXET 300 – Mobile Robotics undergraduate course. Since it is designed for academic purposes, the robot is very well documented, making it easy to replicate when you follow the instructions. In fact, the team is looking for others to build SCUTTLE’s and give them feedback in order to improve its design.

Available on the SCUTTLE website are a large collection of videos to walk you through fabrication, electronics setup, robot assembly, programming, and robot operation. They are designed to help students build and operate the mobile robot within one semester. Most of the mechanical and electronics parts needed for the robot are off-the-shelf and easy to procure and the rest of the custom parts can be easily 3D printed. Its modular design allows you the freedom to try different options, features and upgrades. SCUTTLE is powerful enough to carry a payload up to 9 kg (20 pounds) allowing additional hardware to be added. To keep cost low and construction easy, the robot uses a simple, two wheel drive system, using a pair of geared motors. This forces the robot to literally scuttle in a “non-holonomic” fashion to move from origin to destination in a sequence of left / right turns and forward moves, so motion planning is interestingly tricky.

The SCUTTLE robot is programmed using Python3 running under Linux and has been tested working on either a BeagleBone Blue or a Raspberry Pi. The SCUTTLE software guide is a good place to get acquainted with the system architecture.

The standard configuration uses ultrasonic sensors for collision avoidance, a standard USB camera for vision, and encoders coupled to the wheel drive pulleys for determining position with respect to the starting origin. An optional USB LiDAR can be added for area mapping. The additional payload capability allows adding on extra sensors, actuators or battery packs.

To complement information on the website, additional resources are posted on GitHub, GrabCAD and YouTube. Building a SCUTTLE robot ought to be a great group project at maker spaces wanting to get hackers started with Robotics. We have covered many Educational Robot projects in the past, but the SCUTTLE really shines with its ability to carry a pretty decent payload at a low cost.

Continue reading “Sensing, Connected, Utility Transport Taxi For Level Environments”

Easy Optical Drive Sharing With PYODS

For many of us, the optical drive is a thing of the past. Once considered essential, the technology is no longer featured in the average laptop,where their omission saves plenty of precious space, and they’re rare on desktops, too. However, every now and then, something comes up and it’d be useful to have one on hand. [Klattimer] has just the solution for the MacOS set. 

The Python Online Disk Server, or PYODS, is a tool that allows one to serve optical drives or ISO images over a network to MacOS clients. In its basic configuration, it shares all optical drives on a system, as well as all images found in a select folder. Thanks to using Python, it allows other operating systems to share their drives with Macs. It relies on Apple’s existing API to function, and should be a handy tool for anyone that regularly finds themselves having to scratch around for a way to mount an ISO in a pinch.

Thankfully, outside of legacy applications, cumbersome optical technologies and image files are a thing of the past. If you’ve got drives laying around that you’re not using anymore, why not repurpose them into a plotter?

Numpy Comes To Micro Python

[Zoltán] sends in his very interesting implementation of a NumPy-like library for micropython called ulab.

He had a project in MicroPython that needed a very fast FFT on a micro controller, and was looking at all of the options when it occurred to him that a more structured approach like the one we all know and love in CPython would be possible on a micro controller too. He thus ended up with a python library that could do the FFT 50 times faster than the the pure Python implementation while providing all the readability and ease of use benefits that NumPy and Python together provide.

As cool as this is, what’s even cooler is that [Zoltan] wrote excellent documentation on the use of the library. Not only can this documentation be used for his library, but it provides many excellent examples of how to use MicroPython itself.

We really recommend that fans of Python and NumPy give this one a look over!