Watching birds go by with a Pi Zero – Pt 1

Making a naturewatch camera set-up has occupied me for the past few weeks.  You can buy a kit from here: My Naturewatch Camera at Pimoroni for £34.50 (at the time of writing). I also bought a heat sink for £1.00 from them – and you’ll need a plastic box and power bank.

Camera from side IMG_0758

I didn’t buy the kit because I had some of the components already and wanted to use a blank SD card – but here is the list of costings using the kit:

Naturewatch Camera                                    £

My Naturewatch Standard Camera Kit   34.50

6700 mAh power bank                                17.00

Heat sink                                                           1.00

Plastic box                                                         3.50

Total                                                                  56.00   Postage and Packing needs adding.

The kit is based around the Pi Zero W:

Raspberry_Pi_Zero_W_1_of_6_1024x1024

Pi Zero W photo courtesy of Pimoroni

The Pi Zero W has a special Wi-Fi antenna which is amazingly clever and small.

I had no difficulty following the instructions (which are in a link from Pimoroni’s kit page) to download the software, using a Windows 10 computer, although if you start with a blank SD card you need to format the card. See Disaster struck! – disaster averted to remind you that it’s important to format your SD card without formatting your PC’s whole hard disk!

Camera from top IMG_0759

I’m using a Windows 10 computer to find the naturewatch-robin Wi-Fi and start up the camera.  I couldn’t rename my camera for the Wi-Fi, as it says do in step 10 and 11 of the instructions, so I’ve left it with the default naturewatch-robin and password badgersandfoxes . You do need to have the computer, phone or tablet (you are going to start-up the camera from and see the pictures on) near your camera to make sure the Wi-Fi works.  Once you’ve started the camera you can close the camera.local  website and don’t need to be connected to the Wi-Fi anymore. (I haven’t got it working with my phone yet and don’t know why – but I’ll report in a later post on that.)

I still need to put the lens cover on, made from the top half of a pop bottle, to stop rain getting to the lens – but the weather’s fine, so far, so I haven’t bothered yet.

All I need now is some birds!

I’ll report back when I’ve got some bird images to show you.

Happy tinkering!

 

 

 

 

 

 

Gemma wearables Starter Pack – 3

At last success, and with batteries too, rather than taking power from the computer, so I can soon start sewing!

Gemma_working

One stumbling block was that I got an error:

avrdude: error: USBtiny_transmit 

It turns out that I needed to upload the code to the Gemma while its bootloader was working (i.e. the red light was still on).

avr doesn’t stand for anything apparently. It’s just a particular kind of chip used in the ATiny microcontroller from the Atmel Company.

avrdude  is a  command-line program for programming AVR chips. I assume that means it’s similar to the commands I put in the LX Terminal with my Raspberry Pi.

Well, happy making and tinkering in 2016 everyone!

Continue reading “Gemma wearables Starter Pack – 3”

Gemma wearables starter pack – 2

I had a little difficulty beginning coding the Gemma because after following Christine Tee’s instructions here: #4: Working on Gemma… part 1 I couldn’t see what I needed on the Arduino 1.6.4 code editor.  I work in Windows 7 by the way.

Now open the arduino – 1.6.4 folder to find the arduino coding application file.

(If your files are in ‘Details’ view, you need to choose the file called arduino with the turquoise symbol of a – + in a figure of 8 on its LHS and ‘application’ in the ‘Type’ column on the RHS.)

arduino_screen_1

arduino code editor screen

When you have opened arduino, you then have to set some ‘Tools‘ items.

In ‘Tools‘ you need to choose the Board:

Adafruit Gemma 8MHz

and the programmer: USBtinyISP (I’m not sure why.)

Then in File -> Examples I didn’t have the option Adafruit NeoPixel so I couldn’t get any further. Groan!

Next day

But then Christine gave me the instructions to add NeoPixel to the Arduino library and she’s now put them in the blog post mentioned above. It’s complicated because I put Arduino 1.6.4 in the Libraries-> Documents -> Anne -> Code Club folder that I usually use for all my computing work.  However, Christine said I needed to put the Adafruit Neopixel folder in C:\Users\Anne\Documents\Arduino\libraries , where the program files, from any code I write, goes.

Here are her full instructions in case you need them too:

Christine Tee

“If you have the black Gemma, you should choose Adafruit Gemma 8MHz. Also if you don’t see the Adafruit Neopixel on your Arduino 1.6.4, do the following:

Make sure your Arduino IDE is not running.

  1. Go to https://github.com/adafruit/Adafruit_NeoPixel and click Download ZIP. This should download the library file. 2. Unzip the file. 3. Rename the folder from “adafruit-arduino-1.6.4-windows” to “Adafruit_NeoPixel” 4. Go to C:\Users\(YOUR_USER)\Documents\Arduino\libraries 5. Move the whole Adafruit_Neopixel folder here. 6. Launch your Arduino IDE.

 

The instructions to install the libraries are similar to this: https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use/installing-a-library in case if you need a screenshot. I was running Arduino 1.6.6 because I was working on another Trinket. Thus configuration on mine and yours might be different. Thanks for pointing it out and I will including these instructions into this post later. Good luck!”

I’m going to get the Gemma, the NeoPixels and the alligator clips out right now to try my hand at programming Gemma.

Gemma and the Neopixels come to town! Gemma wearables starter pack – 1

I was the lucky recipient of an Adafruit Gemma Starter Pack on Christmas day!

Gemmav2_Pack

Gemma Starter Pack with Gemma microcontroller & four neopixels

I couldn’t get the test working with out the assistance of Christine Tee’s blog  and my husband’s help, but I learnt an awful lot along the way.  I’ve now tested each neopixel, using the alligator clips, and they are all lighting up when attached to the Gemma and its batteries (in their little black box) correctly.

The third diagram down on this Adafruit page which was copied onto Christine Tee’s blog really helps.

Once I’ve got the little neopixels all wired up and working I’ll need to download and learn about the Arduino IDE* which you use to control and code Gemma and the neopixels.  Gemma and the Neopixels – what a great name for a girl band!  Alright, I agree it’s rubbish!

The tests worked better when the Gemma was connected to my PC via a USB, rather than the batteries, so maybe there isn’t really enough power in those batteries.

Useful tip: The JST† jack that clips the battery box to the Gemma is a devil to disconnect but there doesn’t seem any need to do so.  The Gemma seems to use the PC power without the, additional, attached battery box causing any problem.

Well, I’d better get back to more work as there seems to be a lot to do before I can start sewing.

Happy making and tinkering in 2016!

 

*IDE – Integrated Development Environment. Basically, I think it’s a specialised programming language for use with Arduino products. I get the impression that the one for the Gemma is slightly different than the main Arduino IDE but I’m not absolutely sure yet.
†JST – Japan Solderless Terminal is a standard type of fitting that is used to connect battery boxes to electronic items.

 

Geek Gran buys a Pibrella

PiBrella_photo

Raspberry Pi with Pibrella in place on top (Do you see its red button and traffic light LEDs?)

I always get carried away with the excitement of Raspberry Jams so York’s at the National Science Learning Centre was no exception.  I came away with a Pibrella and very little idea of what I could do with it.  First I needed to get the Scratch GPIO* software to control it, as mentioned in the last post.  As I don’t have an internet connection to my R Pi, I decided to buy the SD card with Scratch GPIO on from Wishtrac.

A great place to get Pibrella and GPIO helps is on the Wishtrac blog at http://wishtrac.com/blog/?cat=4 or here’s one of their ‘get started’ worksheets HELPSHEET 4A:  http://www.wishtrac.com/Pi%20Helpsheets/HELPSHEET%204A%20Installing%20Scratch%20GPIO%20Add-On.pdf

I’ve now got it set up and have had a few teething problems to do with understanding how I use the software.

Tip: If your Pibrella doesn’t seem to all be working:

  • check you’ve got an adequate power supply to it. I’ve moved my Pi power supply to Pibrella and am using my 4 x USB hub to power the Pi,
  • check you are choosing the correct icon on the GUI^ for your Scratch GPIO. I’m not sure about this yet myself but I’ll report when I crack it.

I foolishly changed both of these at once so I’ve yet to find out which or if both are the important factor/s.

My better half set me a task to get a Scratch sprite jumping when the Pibrella button is pressed so I’ve managed to do that. Hence the dragon on the screen.  I also typed in some test Scratch code to make sure all the LEDs lit.

Anyway, that’s my foray into physical computing so far.

That’s all for today folks. Happy Raspberry Pi-ing!

* GPIO General Purpose Input Output
^GUI Graphical User Interface (See post on 11th November 2014)