Raspberry and a PIR Sensor

wpsuperadmin adafruit, c, Programming, raspberry pi 1 Comment

Last month I bought a PIR as part of my Adafruit order for Raspberry Pi stuff. This weekend I decided to try and use it with the RPi.  PIR Sensor (image from Adafruit) Rear of PIR Sensor (image from Adafruit) Using the WiringPi library, it was pretty easy to get it up and running. Here is a picture of it mounted on top of the Prototyping Pi Plate from Adafruit with double-sided tape. Raspberry Pi Plate with PIR and LED I connected it to GPIO 18 or pin 1 in the WiringPi library. Here is the code I used that blinks the LED when there is motion. I used the same technique as the blinking LED test so that I …

Kinect Sensor and Voice Control

wpsuperadmin HomeAutomation, Kinect, Programming, speech, Speech Recognition, Tutorials, VB.NET, Visual Studio, voice control Leave a Comment

In my previous post I mentioned that I had set up Microsoft’s SAPI to implement voice control of my lights. For the most part, it works well with the tweaks I did with the grammar file, except that you have to train your speech. For what I want to accomplish that will be a large issue. I want anyone to be able to walk into my house and use the system. It should be a hands free system that doesn’t make turning the lights on more complicated with having to use something like your phone (but that too, can be an option). I have been playing with the idea of using RFID/NFC but it still would involve always having your phone around; also, not everyone has …

Raspberry Pi and GPIO Permissions

wpsuperadmin Linux, php, Programming, raspberry pi, Tutorials 10 Comments

It works! Okay, back up a little. Getting a PHP web interface to talk to hardware proved to be rather difficult. You need root access to control hardware but the web service runs with minimal permissions. So how does one bridge the gap without compromising the system? The answer, very carefully. I found a few workarounds but they involved either using MySQL or the gpio-admin library that works from commandline or shell scripts. In my case I wanted to stay with using C programs with the wiringPi library being called from PHP. C is much faster to control GPIO and PHP gives me a web front end. Here is how I did it. First the PHP process needs a way to run the binary as …

Raspberry Pi, CommandIR and Beyond

wpsuperadmin c, HomeAutomation, php, Programming, raspberry pi, Tutorials 6 Comments

Now that I have had some time to play with the CommandIR, progress has been made. Of the two initial issues I have one left. The first issue is that LIRCD doesn’t auto start even though it is configured in the hardware.conf. While researching, I came to the conclusion that LIRC isn’t reading the hardware.conf at all. I made a change to it, enabling the listen option to try an Android app but it didn’t take effect. When I manually start LIRCD I have to include the options at the commandline. This is still a mystery but I am working with support on it. The odd thing is the init.d service script doesn’t seem to do anything. TV with IR Emitter Xbox S with IR Emitter …

The Raspberry Pi is Running: Getting You There

wpsuperadmin Debian, Linux, Programming, raspberry pi, Tutorials Leave a Comment

Excited, I ripped open the package to find my Raspberry Pi. The packing looked like it had been run over but my Pi was still intact. Yay! First thing I realized I needed to find a power source and a SD card. After some digging I just ended up using an iPad power adapter with a cell phone micro USB cable. I was going to use my Galaxy S power adapter but I didn’t want to run it close to the limit of 700ma. For some reason I thought I had plenty of SD cards around, but I guess not. Luckily Best Buy had a 32GB Sandisk Ultra class 10 available in store for $27. Perfect! Raspberry Pi packaging, amazing it wasn’t damaged For the most part I hard …

BatchPCB Windows Gadget

wpsuperadmin Downloads, Programming 2 Comments

After obsessionally refreshing BatchPCB’s stats page I got the idea that a Windows Gadget would be perfect and would let me see the latest stats at a glance. This was my first attempt at a gadget but decided to try my hand at it this past Saturday afternoon/evening. I was supposed to be working on my code for Sbot 1 but wanted to see if I could do it. After lots of Googling and trying various things here is what I came up with. Simple but it works. You can download version 1.0.0 here: BatchPCB Gadget The only limitation is it only shows the first panel. If there are more in the queue like on the weekend or evenings it doesn’t show them. I …

Robot Control Web Site

wpsuperadmin Programming, Robot WebSite, SBot1, SBot2 Leave a Comment

Since SBot 1, I have been working on a web site to control my robot. This way any platform can control it as long as it has a browser. Eventually I may create specific apps for Android/iPhone just for the experience of mobile app development as I have not had the opportunity. I recently added forms based authencation. Before it would prompt for login. The back end uses Active Directory.  This is the control site for SBot 1. You can see a tab for JBot1. That is an implementation I setup to use java to refresh the images so they are smoother but doesn’t work for mobile. Control site for Sbot 2 which doesn’t have all the controls yet. I started with the simple ASP.Net example in …

Serial Reading and Parsing

wpsuperadmin Programming, SBot2 Leave a Comment

The code for SBot 2 started with playing with the SpeakJet from SparkFun. I used the code example they posted and my code grew from there as I added functions. This lead to some bad code for receiving serial data and parsing it. Since it was based from the example I had added some code to look for a command character and therefore had some duplicated code and bad data handling. For awhile, it was fine and worked for what I needed. Finally, I was ready to start updating my Robot Web Controller site to add SBot 2 as it was only setup for SBot 1. The SBot 2 has a completely different API. This is where I noticed an odd problem …