Posts

Showing posts from 2016

Third Element14 Post Up!

Hello all, Hope everyone has had a good week thus far. The Weekend is here folks! *whoops* Ahem. The Third Element14 post is up and can be viewed here . Enjoy (the post and the weekend)! *gone with the weekend*

Debison….or, Debian + Edison

Image
I must begin by apologizing for the title of today’s post…I’ve been reading some weird Victorian-style literature and was trying my hand at naming things. Suffice to say it won’t be happening again………anytime soon. Like I mentioned last time, I’m currently keeping busy with an Intel Edison Breakout for Arduino kit. The thing I needed to do was to get an OS up and running on the board. I’m glad to announce that I’ve succeeded (Igor, he’s alive!!!). Here’s how. First off, the basic template for getting this done is available here . For some unfathomable reason, when you get to the part titled “Customize Kernel (Optional)”, things get weird. At least they did for me. YMMV. Note that if you simply want Debian on the Edison and are not infact customizing the kernel, then you need not worry about this part. Simply skip to here . If you’re taking the red pill customizing the kernel , step right this way. First off, take a look at this , specifically points 1 and 2 as they could easily t

End, Edd and Edison

Image
Hello Friend(s). Been a while – been busy with the end of the compulsory Youth Service year, which concluded (for me) a few hours ago. That’s right folks, I’m done with NYSC and free as a bird. Its been a great, memorable year….. As mentioned in my previous post , I received an Intel Edison Breakout for Arduino kit courtesy of Element14. This happened a month or two ago, but I barely had time to really settle down with it until recently. I will be hosting a number of blog posts on the Element14 Intel Community, detailing the ins and outs of building a vehicular robot capable of being controlled over WiFi. The first post, which is an unboxing, can be found here . The Intel Edison is a pretty capable SBC – it has 1GB of RAM and two Atom CPU cores running at 500MHz each, and a Quark microcontroller running at a 100MHz. The onboard microcontroller is no BeagleBone PRU, but runs an RTOS called ViperOS, offering (presumably) (hard) real-time capabilities to the Edison. That’s something I’

Not a First Impressions Post

Hello! This post was supposed to be the promised "First Impressions" post for the IoT pHAT from RedBear we unboxed recently. Sadly, I will be holding that post off for a little while. Why, you ask? Basically, it comes down to the current setup process. Apparently there are certain issues with the Pi's firmware which are to be fixed in the next release. While the pHAT is currently usable, I know whatever process I'd describe will soon become redundant so I'm holding off for the next Raspbian release (should be out really soon) to do everything all at once. In the meantime, I recently got my hands on an Intel Edison Kit for Arduino, so I should post some stuff about that really soon. Perhaps even do a First Impressions post about that instead? ;-)

Revisiting RF24 on Ubilinux

Image
[TL;DR: In summary, we need to modify the “configure” script a little bit, then run the configure command with certain arguments, then edit the Makefile (comment three lines out) then run make install –B. Details/specifics below.] Hello! Although this post should be about the first impressions of the IoT pHAT unboxed last time, my attention was recently drawn to major changes in the RF24 compilation process, so I decided to revisit it and leave the IoT pHAT post for next time. As before, the goal is to be able to use nRF24L01+ radios on Intel Galileo boards running the Ubilinux distro. We’ll be focusing on using the MRAA library as the HAL/backend (recall that RF24 can use SPIDEV or the bcm2708 library as well, the latter supported only on Raspberry Pi boards). To get started, MRAA itself must naturally be installed. To do this, you’ll want to have the following installed: clang, cmake, python-dev, build-essential (things like make and all that). A full list of dependencies is prov

Unboxing the RedBearLab IoT pHat

Image
Hello! Been a while – I hope the winds of fortune have been blowing favorably in your various directions. Been rather busy with work myself, so I apologize for the long silence. As a reparation, today will be my first ever unboxing post! In my never-ending search for cheap yet functional stuff, A few months ago I began following a certain project on Hackaday.io , which combined two of my favorite things at the time – the ESP8266 WiSoc and the Raspberry Pi (Zero). Essentially, the project was exploring a means of using the ESP8266 as a WiFi peripheral for the Pi with full OS support – so theoretically you’d hook up the ESP8266 (specifically the ESP07/12 models as I recall), load up whatever kernel module was needed, and you’d get a wlan0 device which you could use to do awesome. At the end, it ended up working and the board designs and everything needed are up there on Hackaday.io. However that guy ended up with a ~$20 board, which is like 4x the cost of a Pi Zero. Shortly after that,

Nancy

Image
Hello all, I’m hoping everyone has had a good week. Tis Thursday folks, the weekend’s a’comin’! I also realized that I barely blog about anything C#, which is a shame since the blog’s tagline implies I should, so this week I’m going to talk about Nancy. I’ll take a rain check on the Alchemy thing though… NancyFx or Nancy for short is a lightweight, server-side web framework for the .NET framework. Basically, it comes into play when you’re trying to build a web-application with server-side smarts, such as a data-bound application (where data is stored, queried and retrieved), building web APIs (web apps returning XML or JSON data in response to requests) and things like that. Granted, there are tons of neat frameworks to do this for every language – there’s Django for Python, there’s ASP.NET and ASP.NET MVC for the dotNet framework itself, etc. However, ASP.NET and ASP.NET MVC are rather heavy and (for me) rather difficult and clunky to deploy on non-Windows hosts. If you’re going t

Getting Started with Logic Analyzers and Pulseview

Image
Hey all, Been a while. Hope you’ve been up to no good, hm? A couple of days ago, I had to do some low-level I2C work on a bare-metal ATMega328P. Digging out the datasheet, I cobbled a simple I2C driver together, the purpose of which was to permit me write a driver for the particular peripheral which would call the lower-level functions the driver provided (i.e things like i2c_start(), i2c_stop(), i2c_address(), etc etc). When I finished the I2C driver, I tested it out with an MMA8452Q I had lying about and it seemed to work just fine. Believing everything to be dandy, I went ahead and wrote the peripheral driver for the component I was working with. And that was when the funny stuff started. To cut that long story short, it wouldn’t work right when deployed to the hardware. At all. I was in a bit of a bind – the code looked great, no errors no nothing, so it was time to look at the hardware/wire-level end of things. Logic analyzers (in my limited understanding) are tools/instrume

ButtonGizmo

Hey all, As promised, here’s the second update. I would’ve posted this back then, but I needed to sort through some issues beforehand. So without further ado… A couple of weeks ago, I posted about designing a USB-based input device, which would have four buttons, and whenever any of those buttons were pressed, would emit a USB report to the host (PC) specifying which of the buttons was pressed. That was followed up with another post detailing how to configure a V-USB device as a HID. Well, I sorta mashed everything together into a single project I call…*drum rolls* …ButtonGizmo. Let it be known that I’m not known for my astounding naming abilities. Essentially, ButtonGizmo is a HID with eight buttons, which operates as described earlier. While it doesn’t exactly solve a groundbreaking problem, its designed to be a simple starting point with V-USB and HID devices using the same. To this end, I’ve decided to put the hardware design (which is just a schematic – I built it on a stripbo

Enabling SPI1 on the Raspberry Pi B+/Zero/2/3

Image
Me hearties, Let us plunder and pil.. Sorry, wrong blog. Ahem. Hey all, Its been a while. Been busy at work as usual, and haven’t really had much time to write much. As penance, I will post not one but two updates! This particular post is in relation to Raspberry Pi users specifically. I had earlier talked about the vagaries involved in emulating SPI over GPIO in order to get an additional SPI peripheral. It was a moderately involved process, but the rewards were great With the most recent release of the Raspbian Jessie distribution (2016-05-10), a number of improvements have been made to both the desktop parts and the “under-the-hood” parts, perhaps most significantly the kernel. This new release uses Kernel version 4.4, which now adds the ability to use the second hardware SPI peripheral, SPI1, on the Raspberry Pi. This is only available to devices with the 40-pin header (as seen from the title of this post) so users of the original model A and B will probably need to turn to

V-USB: The HIDden parts…

Image
Hello again, Its been a while. Been a bit busy with work and life generally, but I’m sure you know the feeling. Recently, I talked about getting started with V-USB and Atmel Studio 7 . In that post, I highlighted a strange occurrence I’d observed and a suitable workaround. That said, that was just me testing the waters with V-USB. I hadn’t really worked with it much after that, until earlier on today. I wanted to build a simple HID device which could be used as a custom input gizmo i.e it has four buttons, and every time I pressed a button, it would emit a report specifying which button was pressed. On the host side, an application would constantly poll the device and react as needed. Not exactly rocket science I admit, but still somewhat complex since I’d never done it before. This post tries to explain why. First off, I had to specify (in code) that the device was a HID device. This is typically done by creating/modifying the device descriptor appropriately. Luckily, V-USB has an

MRAA and Python on Ubilinux

Yo. I was recently talking to a colleague who was doing some Python work, and wasn’t entirely sure how to go about controlling a Galileo’s GPIO from a Python script. I knew that MRAA actually had Python bindings, but I’d never really been interested in them. Hence, I decided to dig a little deeper to see if I couldn’t get it to work. Turns out its a pretty straightforward process. Basically, you’ll need to have something called SWIG installed. Sadly, I’m not sure which particular version of SWIG it is I have, but I think its regular old Swig 2.0 (which is installed with ‘apt-get install swig’). You’ll also need Python 2.7.x and the Python development libraries, which is installed with ‘apt-get install python python-dev’. Once that’s done, the process is mostly as described in previous posts, with the cardinal difference that the cmake invocation is now as follows: cmake –DCMAKE_C_COMPILER=clang –DCMAKE_CXX_COMPILER=clang++ –DCMAKE_C_FLAGS=-march=i586 –mno-sse –mno-mmx –DCMAKE_CXX_FL

Getting Started with V-USB and Atmel Studio 7

Hello again, As the title of this post says, I’m going to talk about messing about with VUSB and Atmel Studio 7. With regards to the former, I was looking for a cheap/easy way to build USB devices. Having used the excellent Teensy 2.0 from PJRC and the equally as excellent LUFA stack by Dean Camera, I have to say it was a really smooth experience, especially as LUFA got adopted by Atmel and is now a downloadable extension for their Atmel Studio IDEs. However, building more permanent stuff with surface-mount chips while being the way of the future, is relatively difficult for me. Simply put, I have trouble soldering such fine-pitched devices so its really a personal thing. Besides, USB-capable AVRs are fairly more expensive than their DIP counterparts and we all know what that means.. In any case, V-USB is a software-based stack for building Low-speed USB devices with AVR chips. Rather than using the…regular…means (1 or more interrupt/bulk/isochronous Endpoints) data is mostly transfe

OLED!!!

Hey all, Having seen a nice-looking teensy OLED display (0.96”) somewhere, I decided to get one too, so I ordered an SPI version off of Electrodragon (no, I am not marketing for them). The instructions on their Wiki were somewhat vague, so I decided to post a short version here for whom it may concern: 1) The modules are apparently 5V-tolerant and are rated to work between 2.7V to 5.5V, so I’m figuring you can use this with a Pi/other SBC as well. 2) The line called “D0” is actually the SPI SCK line, which for hardware SPI on the Arduino Uno is Pin 13 3) The line called “D1” is actually the SPI MOSI line, which for hardware SPI on the Arduino Uno is Pin 11 4) The other lines (RES, DC and CS) can be assigned arbitrarily and specified in the sketch. To actually drive the display, I used the Adafruit_SSD1306 library (which depends on the Adafruit_GFX library) so you’ll want to grab those using the Arduino IDE library manager (which is really nifty actually). Once that’s done, you’l

Ubilinux on the Intel Galileo: RF24Network

Image
Hey all, been a while. Been surprisingly busy with work and other stuff….assuming “other stuff” turns out to actually work you’ll be hearing about it In other news, I had reason to look into structured sensor nets, and naturally I turned to the nRF24 radios . More importantly, Tmrh20 also wrote RF24Network, which is a network layer for ( n )RF24 radios, with tons of interesting features. Rather than recount everything here, more details can be found here .  For a simple test, I decided to use the Intel Galileo as my “head” node (yeah, all RF24Network…networks need a master node which acts as the centre of the structure, which isn’t all that strange) and an Arduino as a single client node. I’d previously installed the RF24 library for Arduino via the Board Manager, and so I went down this route to get RF24Network as well. For the Galileo, I downloaded the RF24Network sources off of Github, extracted them, and transferred the resulting files to the Galileo. If you’d seen the previou