If you want to use Windows socket functions (such as
WSASend) inside a Ruby extension on Windows, you may have your work cut out for you. Here’s a helpful work-around I discovered during a recent project.
Read more on Windows Socket Functions in Ruby Extensions…
I’ve been getting asked the question, “So how would I get started with embedded development?” more and more often lately.
This is actually a really tricky question. It’s not like, “How would I get started with Haskell?” or “How would I get started with Rust?” Embedded development is such a weird and diverse thing that it’s almost like asking, “How do I get started with programming?” except in an alternate universe where 128k is still a lot of RAM. I’m not sure where to even begin.
Read more on 5 Steps to Getting Started with Embedded Programing…
There are a lot of how-to’s online describing ways to set up a Raspberry Pi without a monitor or keyboard, but none of them are simple or straightforward. This will be.
I’m going to walk through how to do this on a Mac, but something like this should also work on Windows using internet connection sharing and the Event Viewer. Read more on Setting Up a Raspberry Pi without a Monitor or Keyboard…
As I talked about in my last post, Embedded Rust Right Now!, you can call C functions directly from Rust without much difficulty. However, you normally still need to provide Rust types and prototypes for the corresponding C types and functions you want to use. This can be a time-consuming and error-prone process.
Fortunately there is a tool call rust-bindgen that can generate bindings automatically directly from C header files! It’s a little trickier when you’re cross compiling to target embedded systems, but you just need to pass some extra clang flags to bindgen. Read more on Generating Rust Bindings for Embedded Libraries…
Because I’m an embedded developer, I often work on projects where I need to store some data on an extern EEPROM or Flash chip. The internal memory of these chips is usually divided up into fixed sized
pages. It’s often the case that you’re not allowed to write more than a
page at a time. This makes things complicated if you want to do a
write that spans multiple pages. It’s even more tricky if you want to support wrap-around, which turns out to be very handy in certain situations.
Read more on Optimize EEPROM Writes Across Pages…
I’ve been very excited about the Rust programming language for a while now, as evidenced by some previous posts.
Rust recently released 1.0-alpha, which mean it’s stable enough that I might actually consider using it for things. One of the killer features of Rust (at least for me) is that you can call Rust from C and C from Rust. Read more on Embedded Rust Right Now!…
I recently worked on a project that made use of the Robot Operating System or ROS. ROS more naturally lives in the linux ecosystem, but for various reasons I wanted a ROS system in my native OSX environment.
I eventually managed to get it working, but it was not an easy task. But I took careful notes and here is the distilled result. Read more on Getting ROS Indigo Running on OSX Yosemite…
I’ve been getting started learning the Rust language, and thought I’d share some my initial take-aways.
I’m an embedded developer, and most of the code I write for work is in C. As I’ve mentioned before, I’m particularly interested in Rust as it’s a systems language that might one day be a suitable replacement for C/C++ in my everyday work. Read more on Trying out Rust – Packages, Upgrades, & Security…
On a recent project I needed to fairly accurately measure current and power consumption of a handful of parts in real time. We needed to measure current in the range of micro amps, so this was actually somewhat tricky.
I could have just used a bunch of super expensive current meters, but I managed to find a much more convenient and cheap solution using a Raspberry Pi. We were already using a Pi to allow for remote debugging, so I went looking for something I could hook up to that.
I found these ADCs:
They plug right into the GPIO headers on the Pi and even come with some python libraries for reading them.
Read more on Using the Raspberry Pi as a Simple Current and Power Meter…
I recently wanted to get the Haskell SDK bindings running on windows. It was a bit trickier than I thought it would be — mostly due to a terrible macro SDL used to redefine the
main() function. I used the SDL 1.2 bindings as they’re a little more mature than the SDL 2 bindings, which are pretty much brand new. Here is how I got things working:
1. Install the Haskell Platform
Download and run the installer from the Haskell website.
2. Get the msys Base Environment
mingw-get-setup.exe from the MinGW website and run it. You should only have to select the msys-base meta-package (which will install several other packages). Then from the menu, select “Installation” -> “Apply Changes” and press the “Apply” button to download and install. Once the changes are applied, you can close the installer. Read more on Haskell SDL Bindings on Windows…