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!

Faux Cow Munches Faux Grass On A Faux Roomba

Out in the countryside, having a cow or to two wouldn’t be a big deal. You can have a cattle shed full of them, and no one will bat an eyelid. But what if you’re living in the big city and have no need of pet dogs or cats, but a pet cow. It wouldn’t be easy getting it to ride in the elevator, and you’d have a high chance of being very, very unpopular in the neighbourhood. [Dane & Nicole], aka [8 Bits and a Byte] were undaunted though, and built the Moomba – the Cow Roomba to keep them company in their small city apartment.

The main platform is built from a few pieces of lumber and since it needs to look like a Roomba, cut in a circular shape. Locomotion comes from two DC geared motors, and a third swivel free wheel, all attached directly to the wooden frame. The motors get their 12V juice from eight “AA” batteries. The free range bovine also needs some smarts to allow it to roam at will. For this, it uses a Raspberry Pi powered by a power bank. The Pi drives a 2-channel relay board which controls the voltage applied to the two motors. Unfortunately, this prevents the Moomba from backing out if it gets stuck at a dead end. For anyone else trying to build this it should be easy enough to fix with an electronic speed controller or even by adding a second 2-channel relay board which can reverse the voltage applied to the motors. The Moomba needs to “Moo” when it feels like, so the Raspberry Pi streams a prerecorded mp3 audio clip to a pair of USB speakers.

If you see the video after the break, you’ll notice that making the Moomba sentient is a simple matter of doing “ctrl+C” and “ctrl+V” and you’re good to go. The python code is straight forward, doing one of four actions – move forward, turn left, turn right or play audio. The code picks a random number from 0 to 3, and then performs the action associated with that number. Finally, as an added bonus, the Moomba gets a lush carpet of artificial green grass and it’s free to roam the range.

At first sight, many may quip “where’s the hack” ? But simple, easy to execute projects like these are ideal for getting younglings started down the path to hacking, with adult supervision. The final result may appear frivolous, but it’ll excite young minds as they learn from watching.

Continue reading “Faux Cow Munches Faux Grass On A Faux Roomba”

Reverse Engineering Liberates Dash Cam Video

If you’ve purchased a piece of consumer electronics in the last few years, there’s an excellent chance that you were forced to use some proprietary application (likely on a mobile device) to unlock its full functionality. It’s a depressing reality of modern technology, and unless you’re willing to roll your own hardware, it can be difficult to avoid. But [krishnan793] decided to take another route, and reverse engineered his DDPAI dash camera so he could get a live video stream from it without using the companion smartphone application.

Like many modern gadgets, the DDPAI camera creates its own WiFi access point that you need to connect to for configuration. By putting his computer’s wireless card into Monitor mode and running Wireshark, [krishnan793] was able to see that the smartphone was communicating with the camera using some type of REST API. After watching the clear-text exchanges for awhile, he not only discovered a few default usernames and passwords, but the commands necessary to configure the camera and start the video stream.

After hitting it with the proper REST messages, an nmap scan confirmed that several new services had started up on the device. Unfortunately, he didn’t get any video when he pointed VLC to the likely port numbers. At this point [krishnan793] checked the datasheet for the camera’s Hi3516E SoC and saw that it supported H.264 encoding. By manually specifying that as the video codec when invoking VLC, it was able to play a video stream from port 6200. A little later, he discovered that port 6100 was serving up the live audio.

Technically that’s all he wanted to do in the first place, as he was looking to feed the video into OpenCV for other projects. But while he was in the area, [krishnan793] also decided to find the download URL for the camera’s firmware, and ran it through binwalk to see what he could find out. Not surprisingly the security turned out to be fairly lax through the entire device, so he was able to glean some information that could be useful for future projects.

Of course, if you’d rather go with the first option and build your own custom dash camera so you don’t have to jump through so many hoops just to get a usable video stream, we’ve got some good news for you.

Linux Fu: Python GUIs For Command Line Programs (Almost) Instantly

Not every programmer likes creating GUI code. Most hacker types don’t mind a command line interface, but very few ordinary users appreciate them. However, if you write command line programs in Python, Gooey can help. By leveraging some Python features and a common Python idiom, you can convert a command line program into a GUI with very little effort.

The idea is pretty simple. Nearly all command line Python programs use argparse to simplify picking options and arguments off the command line as well as providing some help. The Gooey decorator picks up all your options and arguments and creates a GUI for it. You can make it more complicated if you want to change specific things, but if you are happy with the defaults, there’s not much else to it.

At first, this article might seem like a Python Fu and not a Linux Fu, since — at first — we are going to focus on Python. But just stand by and you’ll see how this can do a lot of things on many operating systems, including Linux.

Continue reading “Linux Fu: Python GUIs For Command Line Programs (Almost) Instantly”