Showing posts with label raspberry pi. Show all posts
Showing posts with label raspberry pi. Show all posts

Sunday, May 3, 2015

Jamrific

Over the last few weekends and then some, I have been playing with the Colorific RGB Bulb from Amazon. Inspired by this learn guide https://learn.adafruit.com/reverse-engineering-a-bluetooth-low-energy-light-bulb/explore-gatt I decided to make it reactive to audio. Finally! An excuse to buy the Teensy Audio shield!

Here are a few pictures and a short demo of it in action. You can find the code and my notes on the issues with it and where the project is at currently on:https://github.com/FriedCircuits/Jamrific

Teensy 3.1 with Audio Shield, TFT connect to RPi

Raspberry Pi 2 with BT 4.0 and UART connected to Teensy 3.1.

Colorific Bulb in action


Sunday, February 22, 2015

Raspberry Pi 2 and Motorola Lapdock

Back in October of 2012, I had tested the Motorola Lapdock with the original 256MB Raspberry Pi. Recently I was able to get my hands on a Raspberry Pi 2 and decided to see if it worked any better. It pretty much works the same in that if the Lapdock doesn't detect it, it goes to sleep and it won't try again until it turns itself off. So the only way to get past the point in boot where the display signal is lost for a second, is to power the Pi up from another power source with the HDMI connected. You must wait for it to fully boot. Then disconnect the HDMI, wait for the Lapdock to turn off, and then plug it all back in and power it up. It's quite the sequence just to get it to work.

This time around I had a hard time with audio. Last time it was a struggle too, but at least it worked. I didn't spend a lot of time on it, but only the way I could get it to work was by loading the Python games app and selecting force headphones. Then you can use the web or anything else but this is using headphones instead of the built in audio. A lot has changed in software since the 256MB version so this needs more investigating.

Raspberry Pi 2 and Motorola Lapdock
This is unfortunate since the Raspberry Pi 2 and all of its power would make a great travel companion with the Lapdock. What really needs to be done is a way to fake an HDMI signal at all times in any case it would work much smoother. Maybe if the Lapdock can be hacked to always stay awake or a longer detection timeout. At this point it will be at the bottom of the project list.

Monday, June 30, 2014

ZenMiner: RPI Temps

The first week of the Fury's (Zeus Blizzard) Scrypt miners from GAWMiners came with a free ZenController. It's basically a Raspberry Pi, case and a memory card that is setup ready to mine using ZenMiners cloud service. Simplifies the process of setting up mining without a computer.


Wednesday, June 18, 2014

Live Raspberry Pi Power Usage!

Since the release of the Raspberry Pi, I have had one on my desk powered up. It's my go to Pi that is always available on the network. It's mostly running Python stuff and eXtplorer. After all this time, I have always wondered what it really costs to keep a Pi powered up 24/7/365. Then one evening, it dawned on me, I have the USB Tester why not use that? Doh! One thing lead to another and I realized why not log the serial output to the Pi itself.




Using my existing Python code for logging motion to Cosm\Xiviely, in one night, I could easily set it up to log the RPi power usage to the cloud. Pretty freaking sweet, right!? (My wife popped into our home office to check if I was okay as I was using a lot of !!!.)

Below you'll see the embedded live graphs of the RPi running. Currently it is updated every 20 secs but this image is rendered only on page load.

Here is the link to the live data on xiviely
https://xively.com/feeds/894130969





Code: https://github.com/FriedCircuits/RPi_Status

Just remember to enter your API and Feed ID. Also chmod +x rpi_status.py. Makes it easier to run.

Not sure why I didn't think of this sooner!



Sunday, October 20, 2013

Raspberry Pi Camera Module and Streaming

Now that the camera is connected it's time to test it. I have always liked setting up a camera for real-time streaming, plus it's helpful whenever I am away on a trip. With the PIR project, I could use that to record on motion instead of using image based motion. This would allow for no false positives, unless of course you have animals.

You can use the standard mjpg-streamer but it can't read from the camera module directly and therefore you need to save a file and then read it back. This would be a fast way to wear out your your SD card. I knew there had to be a better solution. Then low and behold I found this:

https://github.com/jacksonliam/mjpg-streamer

He wrote a module that allows you to stream directly from the camera module. It's not the fastest but it works.

From your home directory:

git clone https://github.com/jacksonliam/mjpg-streamer

$ cd mjpg-streamer/mjpg-experimental

$ make clean all

To launch

$ export LD_LIBRARY_PATH=.
$ ./mjpg_streamer -o "output_http.so -w ./www" -i "input_raspicam.so"

Connect via your browser

http://RPi_IP:8080/


I created a mjpg.sh file in my home directory that contains the above and then made it executable:

$ nano mjpg.sh
#!/bin/bash
cd ~/mjpg-streamer/mjpg-streamer-experimental
export LD_LIBRARY_PATH=.
./mjpg_streamer -o "output_http.so -w ./www" -i "input_raspicam.so"

$ chmod +x ./mjpg.sh

You could also add this to crontab to have it start with the system.

$ crontab -e

then add

@reboot ~/mjpg.sh


You can use VLC as a streaming client but there is a much greater delay due to buffering. This might be adjustable, I just haven't checked yet.

Raspberry Pi Camera Module + PiBow

Previously I show how to mount the Raspberry Pi module in the Pimoroni camera mount, but now we need to connect it. Connecting the camera to the RPi is pretty easy if you are careful and there plenty of guides, but I wanted to use it with the Pibow case. The new PiBow cases have a slit for the ribbon cable but if you have the older version, you can make it work. Here is how I did it:




Check out this post about using the camera and real-time streaming with mjpg-streamer.


Friday, October 4, 2013

PiGlow from Pimoroni

In a recent Adafruit order I couldn't resist picking up the new PiGlow for the Raspberry Pi. This is a neat 18 LED add-on that connects to the GPIO header of the Raspberry Pi and communicates over I2C. With the example Python code, I was blinking in color in no time.

You can buy them from Adafruit in the US or directly from Pimoroni in the UK. The Pimoroni site has all the links to get you started. I used the link to Jason Barnett's Gihub which has a in depth how-to and a lot of examples to get you started and playing in color.



The LEDs are in a spiral pattern, making for a great binary clock, which is included in the code examples. I ended up taking it to work leaving the clock to run all day. Within the clock example you can set the LED brightness. All of the 18 LED brightness can be set from 0 to 255. I can tell you that 255 is super bright, I mean especially bright, as in put on your sunglasses. Especially the white LEDs in the center. Which just made me think of one cool project. With a PIR and light sensor you could make a hallway light, and even tweet when it is activated. That is how bright the white LEDs are.

All the LEDs are a single color. Starting from the center you have white, blue, green, yellow, orange, and red. Plenty to play around with. One great feature is that if you have their PiBow case, it fits with the case completely closed.



I think its a great addition to the Pi and there is so much you can do with it. The only thing I would like to see is maybe a version that doesn't block all the GPIOs with maybe a stacking header. It only uses power and I2C but you lose access to the rest. You could use a breakout like Adafruit's Cobbler or T-Cobbler and then connect the needed connections to the PiGlow.

This can be a great learning tool for someone new to the Raspberry Pi and Python. You can learn Python with instant feedback.

Thursday, August 29, 2013

Raspberry Pi Camera with Pimoroni's Camera Mount

In my last Adafruit order, I decided to get the Raspberry Pi camera and the Pimoroni Raspberry Pi Camera Mount. This has been on my to-buy list for quite some time. I first saw the camera in person at Hacker Dojo when Rob from RPi came on his tour in the States. I am really excited to see what fun stuff I can come up with. In the past I have used a webcam on my desktop with ActiveWebCam to stream my entry-way to keep tabs on it. I want to try the Raspberry Pi to replace this setup as well as other projects. I have may have to put a few more cameras to go with all the Pi's on my desk.

The camera comes in a static bag with a how-to card and in the same box as the Raspberry Pi comes in.

Raspberry Pi Camera Box and Camera Mount

Contents of Raspberry Pi Camera

Saturday, January 12, 2013

Raspberry Pi and eXtplorer

Over the last few months as I have been working with the Raspberry Pi, I have been using eXtplorer as a file manager and text editor. It is PHP and runs from the RPi's web server. This is a great way to write code on the RPi from your desktop or from any web browser. I figured that I should share it since it is such a great tool. It should almost come with Rasbian. You can find it here: http://extplorer.net/

Here are some pictures of it running on the RPi:

eXtplorer Login Screen




eXtplorer File Manager



Some of the great features are listed below (from their site). This is a must needed tool for working on the Raspberry Pi! I can't live without it.


eXtplorer Features

The Main Features of eXtplorer are:
  • Copy & Move Files and Directories by Drag&Drop
  • Dynamic Directory Tree with on-demand loading of subdirectories
  • Edit Files (with Syntax-Highlighting thanks to EditArea)
  • Rename, Delete or Create new Files and Directories
  • Access Files through ''FTP'' or directly (using PHP) to totally overcome permission and file ownership issues
  • Upload or Download files just as you like
  • Create and Extract Archives (ZIP, Tar, Tar/GZ, Tar/BZ)
  • User Management with different permission levels like "View only" or "Edit" and "Admin"

One of the features not list above is you can set Linux permissions and when working with multiple files they each can be viewed in their own tab.  This interface uses the extJS4 interface library which I would love to learn. I messed with it a bit but I need to spend more time on it. It would be a great environment to develop my entire Home Automation and Robot controls in.

Do you use or have you heard of eXtplorer? Let us know, I'm always looking for other projects!

Tuesday, November 20, 2012

Raspberry Pi 1/2 DOA

When the 512MB version of the Raspberry Pi was released, I couldn't resist not getting one. This would be perfect as a permanent attachment for the Motorola Lapdock and a Pillbow case. A few days later I received it in the mail and loaded Adafruit distro on a borrowed SD card from our digital camera. This is when things started to go awry.

After first boot I went through the setup, including region and all that stuff. That last thing I did was a rpi-update to update the firmware. After that it wouldn't boot, or so I thought. I tried multiple images and SD cards. So far, nothing. It looked like it would boot and then get to a point, lose video and Ethernet. After many hours and days of fighting with it I realized something. It was almost like it was booting but just loosing Ethernet and HDMI. So I tested my theory.

I whipped out my Sparkfun FTDI Basic 3.3v version and connected to the UART of the RPi. What do you know? It booted up and worked perfectly! So I came to the conclusion that the CPU is fine but all the attached devices are bad, like Ethernet, HDMI, and USB. From my tests even the composite video out didn't work, really odd problem. I was confused since it seemed to work initially. I did get it to boot a few times but it would never last.

512MB Raspberry Pi with Sparkfun FTDI Basic

But not all is lost. The wonderful people at Newark refunded the money without having to send the bad one back and after making a new order, made it priority, even though I had to wait over a month but the new one should be here tomorrow. As for the defective one I could use it over UART and just use it for the GPIOs. I ran it for a few days monitoring the CPU temp in a terminal session over UART and it was stable so it should be useful for something down the road, at least I hope. If anything it would be good to use for showing and explaining to people what a RPi is since they can touch it all they want, it's already defective right?

Thursday, October 18, 2012

Wishlist: Raspberry Pi 512MB

With the recent release of the latest Raspberry Pi (512MB version), I thought it would be fitting to add it the Wishlist. This newest version was announced just this week and I was fortunate enough to snag one before they sold out.

If you've thought about diving into Linux and physical computing, this beauty would be the perfect gateway. Really, for me it's become greatly addictive. Also, it would be an awesome gift to get someone started.

The minimum requirements for it is a 4GB or greater SD card and a 5v power supply. A monitor or a TV with HDMI isn't necessary; you could run it headless. You can also get some really cool accessories like cases (like the Pibow below), WiFi cards, USB hubs, or some breakouts for the GPIO. Newark and Adafruit offer various accessories to help you along.

You can check out the specs from the Raspberry Pi foundation's website or take a look at what I've done with their previous version.

For now, enjoy some eye candy!

Raspberry Pi 512MB.

The Pibow Raspberry Pi case fits snugly! 





Wednesday, October 3, 2012

Raspberry Pi and Cosm


Over a month ago I decided to give Cosm.com a try instead of using my own MySQL database and graphing in Python. Since this was awhile ago I don't remember everything I did to get it working but I will post the code and libraries I am using that work.

Here is a simple library to making sending to Cosm easy.

http://www.netfluvia.org/layer8/?p=175

Here is the full code I am using to log the PIR sensor to Cosm, after the jump.

Tuesday, October 2, 2012

Raspberry Pi and Motorola Lapdock

Last month I jumped on the fire sale clearance at Verizon for the Motorola Lapdock 100 (for the Razr). First thing I wanted to do is connect it up to the Raspberry Pi. To do this I had to order some cables and adapters. Here are the cables I ordered plus and the adapter to later use it with an Android stick.


HDMI To HDMI Female F/F   - For the Android stick or connecting to a regulator HDMI cable.

5FT 1.5m Micro HDMI to HDMI Cable - Convert Micro HDMI to full size.

Micro HDMI Type D Female to Micro HDMI Type D Female - Join the HDMI cable to the Lapdock.

USB 2.0 A Male to Micro USB 5 Pin B Male adapter cable - Donor for RPi USB data lines.

Micro USB B Male Female M/F Extension - To connect to Lapdock and to splice into for data lines.


Monday, October 1, 2012

Raspberry Pi Tour Photos

Here are a few photos from the RPi Tour. I was able to capture them while spending the afternoon at Hackerdojo in Mountain View. It was great getting to meet Rob, from the RPi foundation, as well as the other makers who attended.

Fun noodle-thing-a-bob art sculpture

Sunday, September 30, 2012

Raspberry Pi Tour at Hackerdojo

Quick post! @heartsy and I are at hackerdojo listening to Rob Bishop speak about the Raspberry Pi. It's great that they are sharing so much with the hacker community. We're able to bring along projects, so I've brought my RPi to show. Thought it would be neat to post from it!

Saturday, September 22, 2012

Raspberry Pi Factory pictures from South Wales

A very quick set of photos taken this morning at the Sony factory in Pencoed, Wales, where Raspberry Pis are being built at a rate of around 2500 a day. Pete, Eben, Mike from Farnell and I were visiting the factory to celebrate its 20th anniversary (and the 40th anniversary of Sony in Wales). This is a bit quick and dirty – these were taken with my phone. We’ll have some nicer photos and some video of the line, the automated processes and some pictures of the whole team to show you later on, but I know a lot of you were waiting to see these today: so here they are!




Source: Raspberry Pi

Sunday, August 26, 2012

Raspberr Pi: htop

In my other posts, I forgot to mention that I use htop instead of top for viewing processes.

If you want to install run:

$ sudo apt-get install htop

and to run:

$ htop

It works nicely, it's colored, and it's easy to use with the arrow keys.




Raspberry Pi SD Card Backup

Just wanted to post a quick note about backing up the Raspberry Pi. After your hard work of configuring it the way you want it, don't forget to back it up! It's also a good idea before making any big changes. I know it's a pain, but worth it in the end. I didn't do it for awhile just because I was too lazy to shutdown the Pi and remove the SD card. Since my workstation is Windows 7 Ultimate x64bit, I use win32diskimager, which works really well.

https://launchpad.net/win32-image-writer/+download


On a side note, I should see if there is a way to do an online backup. Then I can continue to be lazy ;).

My backup before switching to Debian Wheezy





Quicknote: Raspberry Pi > Python > Serial (Updated)


Here is a quick note on using USB serial with Python. I hooked up a Sparkfun explorer board with a Xbee series 1.
Sparkfun Xbee Explorer
https://www.sparkfun.com/products/8687

Sunday, August 12, 2012

Mobilewill on Adafruit Show and Tell


Adafruit's Show and Tell is a must if you're looking to get ideas on various projects. Ladyada hosts a Google+ Hangout each Saturday evening in which she invites makers to share their latest projects.

This last week, I was able to get on and join in. Check it out below! 



I showcased my Raspberry Pi Motion Logger which you can read about here http://www.mobilewill.us/2012/08/raspberry-pi-and-motion-graphing.html.

Have you watched any or shared projects of your own? I'd be interested to hear about it!