MEAN (Angular, Node) for Django programmers (part 2)

Continuing where I left off in part 1, a list of things I had to struggled with when I switched from Django to MEAN. Should I embrace Mongo or stick with Postgre/MySQL? There's no right answer here, so I'll speak from experience. Thinking relational is what I'm used to and it's not trivial to make the shift to schemas that may actually encourage data duplication. At first I decided to stick with MySQL but I quickly switched to Mongo for a few reasons: There is no free SQL hosting service I felt like using. Heroku's free Postgre tier has ...

MEAN (Angular, Node) for Django programmers (part 1)

A few things I would have found helpful when making the switch from Django/Twisted to MEAN (Mongo, Express, Angular, Node). How should I get started? For me the process was: Write a simple RESTful service with Node/Express/Mongo Write a standalone, server-less Angular application Combine the two together To get start with (1), I recommend this scotch.io tutorial. There's nothing conceptually new here besides perhaps Mongo being a document store, but this won't come into play; mongoose wraps that up like an ORM. You should then follow the official Angular tutorial to get a grasp on Angular ...

lpicp: Turn any board running Linux into a PIC programmer

This is probably not what you think it is. It is not an application that controls ICD2, PicKit2 or any form of custom LPT PIC programmer for a PC (you can use MPLAB X for that). What lpicp does is provide a user space application and kernel driver to perform the functionality of a PIC programmer on embedded systems running Linux. After deploying these modules onto such a system (and assuming the hardware is layed out properly), you can run something like: lpicp -x write -d /dev/icsp0 -f my-pic-program.hex and have your embedded system program a Microchip PIC ...

Implementation notes for Embedded Linux

This post hosts a few blurbs about issues I ran into when developing for Embedded Linux and did not find decent documentation on google. It will update as I plow through more stuff. Getting the telnet server (telnetd) to accept connections when using DENX SELF By default, if you try to connect to the server, you’ll get an error claiming “all network ports in use”. This is not so much of a SELF configuration thing, rather how the kernel is set up by default. Assuming you ran MAKEDEV (see my installation post) when installing the ELDK, you’ll have ...

Implementing a preemptive kernel within a single Windows thread

About three years ago I developed a real-time operating system aimed at the new generation of 32 bit microcontrollers. Seeing how I am a devotee of developing/testing embedded software on a PC and only then porting/testing to the target, one of my goals was to get a working simulation environment under Windows. I had thought at the time that I would have a lot of reference, seeing how most real-time operating systems (FreeRTOS, for example) have Windows ports. To my surprise no port implemented true preemption, instead opting for simply wrapping the Windows API with the equivalent RTOS ...

Repairing FreeNAS after a power outage (FreeNAS rebooting)

For reasons beyond me, I have a storage server set up with FreeNAS. I find it convenient to have all of my movies/music/TV shows on a PC that sees no action besides reading and writing to its drives. This weekend, while streaming a show from my storage server, the power went out. The server is connected directly to mains, so it went down – hard. To be fair, my Ubuntu based media center PC also died, never to recover. After a bit of troubleshooting and an annoying secondary problem, it seems to be up and stable. My FreeNAS server ...

U-Boot / Linux bringup by example

This post describes the steps required for setting up an Ubuntu based compilation and debugging environment for U-Boot and Linux 2.6 w/a JFFS2 filesystem on a custom PPC board, using an Abatron BDI3000. It mostly discusses the environment and doesn’t dive too much as to how to customize the packages for your specific board (this is the hard part, but also extremely board specific). While you will probably not follow this guide from start to finish, it serves as a reference for what is the minimal amount of work required to build U-Boot and Linux for a ...

Rotary encoder based cooking timer

Continuing my experimentations with cooking timer user interfaces, I stumbled upon a cute little rotary encoder on Sparkfun. It immediately looked like a good match for the project. The thing is that all cooking timers I’ve seen have either a simplistic interface requiring many clicks to set the time (like clicking the “minutes” button 50 times) or a complex keypad with way too many buttons. At first I thought I’d need 2 axes (axis 1 would increment by 1 minute and the other axis by 15 minutes) but fiddling around with the trackball showed me that it was ...