Posts

Showing posts from February, 2016

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_FLAG…

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 transfer…

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 133) The line called “D1” is actually the SPI MOSI line, which for hardware SPI on the Arduino Uno is Pin 114) 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’ll want to ru…