Google+ Followers

Sunday, 25 May 2014

Arduino Uno + Display countdown timer

After making the arduino into a timer with the previous script, I decided it was time to try and make it countdown instead, also was to make it more dramatic with the tenth of a second showing for a faster count down look.

Below  is the code I have used, so enjoy



/*
  LiquidCrystal Library - Hello World

 Demonstrates the use a 16x2 LCD display.  The LiquidCrystal
 library works with all LCD displays that are compatible with the
 Hitachi HD44780 driver. There are many of them out there, and you
 can usually tell them by the 16-pin interface.

 This sketch prints "Hello World!" to the LCD
 and shows the time.

  The circuit:
 * LCD RS pin to digital pin 12
 * LCD Enable pin to digital pin 11
 * LCD D4 pin to digital pin 5
 * LCD D5 pin to digital pin 4
 * LCD D6 pin to digital pin 3
 * LCD D7 pin to digital pin 2
 * LCD R/W pin to ground
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)

 Library originally added 18 Apr 2008
 by David A. Mellis
 library modified 5 Jul 2009
 by Limor Fried (http://www.ladyada.net)
 example added 9 Jul 2009
 by Tom Igoe
 modified 22 Nov 2010
 by Tom Igoe
 Modified by www.mypifi.net/blog May2014

 This example code is in the public domain.

 http://www.arduino.cc/en/Tutorial/LiquidCrystal
 */

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(8,9,4,5,6,7);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("Secs Remaining:");
  delay(100);
}
 
void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(270000-millis()/100);
}

Saturday, 24 May 2014

Mypifi back to basic boards

Over the coming weeks I intend to start a kickstarter project for my first pcb board aimed at people with no soldering skills and new to the pi.  The board is also ideal for schools too as it's not expensive, no noisy buzzers and with a button plus three LEDs, makes an ideal small cost efficient teaching tool.

It's a simple 3 led board with a button and if funding is successful will sell them with the bits for a rrp of £9.99 I will do an early bird for those fast enough for £6.99 and if I can secure over a thousand orders will add a stretch goal of a free pcb for each order, just source the parts for the second board yourself.

I already have code on its way and a uk board manufacturer in place for when we are funded.

Once ready to go I will post back and let you all know, just watch and tweet on twitter and follow me @smstextuk


Friday, 23 May 2014

Assembly of the pi crust board

I started off with the gpio header using the extended version this had to be done first as it would be impossible later on.


I then started from the middle soldering the breakouts section by section using a tiny blob of solder to hold it in place before checking it was straight.


Next up was the gpio heads on top of the board I wanted to have extras, and them being male in case I needed a male connection on top of what I already had, I also slightly angled them away from the gpio port.


Then it's all complete ready for you to use in your projects.


Monday, 19 May 2014

Simple beginners lcd timer with arduino and lcd shield




Playing with the example scripts on arduino ide and my arduino uno r3 with a DF Robot LCD Keypad shield i have managed to get a simple timer working which shows the time since plugged into power. the simple script is below and with playing around with it i guess you could make it count down from a certain number to zero and flash as it reaches 0.

/*
  LiquidCrystal Library - Hello World

 Demonstrates the use a 16x2 LCD display.  The LiquidCrystal
 library works with all LCD displays that are compatible with the
 Hitachi HD44780 driver. There are many of them out there, and you
 can usually tell them by the 16-pin interface.

 This sketch prints "Hello World!" to the LCD
 and shows the time.

  The circuit:
 * LCD RS pin to digital pin 12
 * LCD Enable pin to digital pin 11
 * LCD D4 pin to digital pin 5
 * LCD D5 pin to digital pin 4
 * LCD D6 pin to digital pin 3
 * LCD D7 pin to digital pin 2
 * LCD R/W pin to ground
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)

 Library originally added 18 Apr 2008
 by David A. Mellis
 library modified 5 Jul 2009
 by Limor Fried (http://www.ladyada.net)
 example added 9 Jul 2009
 by Tom Igoe
 modified 22 Nov 2010
 by Tom Igoe

 This example code is in the public domain.

 http://www.arduino.cc/en/Tutorial/LiquidCrystal
 */

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(8,9,4,5,6,7);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("mypifi.net/blog");
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(millis()/1000);
}



Here is a quick video http://www.youtube.com/watch?v=UGqfLWKtlo0

Starting off with an arduino uno

Last few weeks I've been getting involved with the new raspioduino like other raspberry/duino boards like gertduino there is only so much you can do that arduino IDE will allow or maybe it's cos I'm a beginner on the arduino.

However after dusting off my old uno r3 which I've never got any further than blinking an led I was able to play with the various boards. Still not enjoying gertduino just don't seem to gel with it. However raspio duino apart from the lack of adding boards to it (please make one I can add boards/shields to) ;) I was able to make a colourful array http://youtu.be/5Vq9tOulb6M now I felt I was getting somewhere.

So next up was to get the uno working and found it was actually more simpile than it looks, however the LCD plate I got seemed not to work till I came across the coding by Simon monk in his arduino sketches book where he uses the same LCD keypad shield as me.

So changing the LiquidCrystal section to 8,9,4,5,6,7 and I was soon up and running, shame I just ordered another LCD shield but figuring they only a few quid from Hong Kong and China that it's no loss and have since ordered an Ethernet shield led shield and a few others to tinker with. If I can get an understanding this end then I might get further with the atmega m328p chips on the gettduino and even further on the raspioduino.
 

Saturday, 17 May 2014

Raspio duino more progress

I've been trying out the duino board from raspio and although it's mainly been trying out example scripts and building the lights up to make them work, it's certainly further than I got with gertduino which did make an appearance today but sadly I still got no where even following someone's blog, so it was back to beta testing this great raspio duino, here's a video of the colourful array I made.



Sugru best invention since superglue?

I got some sugru this week to try out on some raspberrypi projects.  

Sugru comes in small packets and feels like putty and similar to the putty I used as a kid to make models etc when I used to be into games workshop stuff like space marines and adaptus titanicus however it was spelt.

But this stuff is different it can bounce and absorb shock too, so I decided what can I make with it within the 30 minutes of opening that I can leave over night to form?

First up was some feet formula pitft screen the plastic screws would always stick out so decided to add feet to protect what it stood on and give it some grip.



Next was my robot project that needed to turn a bit more red so carefully used it to model some shape into the robot and add some more red to it.


And with the remaining black sugru I decided to make some nuts for the ir sensors on the bottom like so.


On checking on this a day later it had formed a hard seal and the sensors were going nowhere.

Looks like now I have a contender for the gorilla glue but not so messy.



Friday, 16 May 2014

The Ryanteck budget robot adding software

After building the Ryanteck robot in a previous blog  http://smstextblog.blogspot.com/2014/05/assembly-guide-to-ryanteck-rtk-003.html  I decided it was now time to add the demo files from Ryanteck.

With a raspbian image on the card I did the following:

Expand card option one on the first ever start up. Then advance menu and lower the gpu usage to 32 and turn on ssh. Lastly choose the option to update. If you need to get back to this in future just open terminal and type sudo raspi-config


Next was to get back to command line and type the following:

Sudo apt-get update
Sudo apt-get upgrade
Sudo apt-get dist-upgrade
Sudo shutdown -r now

The system will now reboot, once rebooted you will need to enter the following command to get the Ryanteck sample files.


This will install everything into a folder called RTK-000-003 where scratch, C, python and other folders will be for the different programming languages will be. As the software progresses and more people contribute I can see this repo being very helpful.


Here is a quick video of my Ryanteck budget robot in action:


Next up will be to add camera to this and have a go with the web interface.

Just a note for anyone controlling it, whilst using the W, S, A, D keys a keyboard is best, but if you are using a touchscreen it will act more like stepper motors due to the fact that touchscreen will only register one touch where as keyboard will register key hold down as many times thus the difference.


Oxford raspberry jam

Last night was oxford raspberry jam and a first time for me. I have found each raspberry pi jam is different, some you turn up and set you project up on a table and let people have a look, others you explain quickly the project and others that you have to do a presentation.

The oxford one seemed a bit more formal all sitting around like a boardroom table. There was Dave with his robot that he picked up from a car boot sale for £8 that he had programmed to take voice commands and use the wolfram system (like iPhone Siri) to ask questions and have them answered.


Next Alex from raspi.tv was showing his hdmi.pi TV and his add on boards of which I have been playing with and probably my best achievement with arduino so far. I do have a uno but never got anywhere with it.

I was next with my Ryanteck budget robot. I soon realised when I got there I should have brought a router with me but soon managed to get my phone and pi connected to the wifi set up for the event and was able to ssh into it to demo the robot. I also showed off my wildlife cam to.

Alex green brought along his robot with the bigger 4tronix robot board built over a week on a train journey.


There was also a new board project for controlling robots and a huge robot controlled by pi.

The whole event seemed quite relaxed and was interesting to meet people with different expertise and professions yet all had the same hobby and yet as seen with most jams an equal playing field where everyone is always willing to help each other.

Hopefully this event will be at weekends soon, if so that be brilliant as I will be able to attend more.

Wednesday, 14 May 2014

How to put raspbian onto an sd card

It's really simpler than it looks, you will need an 8gb sd card class 4 min class 10 best. You will also need a USB SDHC card reader as the built in card readers on PC and laptops cannot cope doing the following.

Firstly go to www.raspberrypi.org/downloads and download the latest copy of raspbian, right click the zip file and choose to extract, this will save with a .img file name.

Next place the card in the USB reader and plug in. You should already have downloaded sdformatter a sd card formatting tool from the people who decide the specs and standards of sd cards. Open it choose options, choose full and format.



Once done close the program and open win32 disk imager a popular program for putting images onto USB and sd cards.



Find the .img and choose the device location, then click write to device.


Once done close the program, take out the sd card and place into the pi, the hardest bit is done.

Tuesday, 13 May 2014

Assembly guide to the Ryanteck RTK 003 budget robot kit

Today arrived the long awaited £30 budget robot kit, the only thing needed that wasn't in the box was a pi and some batteries and a battery pack for the pi which would raise the price to a total of £60 but expecting you would already have a pi, batteries lying around and a USB power bank of some kind the project seems an excellent price.



The project comes in a nice size box with everything neatly inside.

First thing was to sort everything out.


The pack comes with two battery holders, you only need one, that being the open version as it has screw holes inside.

Firstly I screwed on the castor wheel you will see like a square at one end that this will fit in,ensure you screw it the way the picture shows or the screws will interfere with the castor.


Next was to add the motors to the frame, these require the long bolts to go through the two holes in the motor and the little metal bracket again follow the picture example so the screws don't interfere with the wheels then screw to the frame as per picture.


Push the wheels and if you want can add the distance measurement wheel to each motor which is now the inner section of the board but opposite side to the wheel.

Next was to screw the pi to the chassis using the hexagonal bolts.  Using the two  pi mounting points screw the two bolts into it till it's tight, don't worry if there is a gap as long as it holds the pi as per picture below.


With the other two hexagonal bolts attach to the frame and screw them into each other like this.



Next is the battery pack as per photo.




Next stage is a bit of soldering, with the guide I have written here: http://smstextblog.blogspot.co.uk/2014/04/how-to-put-rtk-000-001-motor-control.html


Once built plug it on top of the pi attaching the positive and negative to the single blue block as per bottom right of above picture, red in left and black in right.  Here I found a jewellers screwdriver just right for the job.

Underneath it was time for some soldering, due to the way the motors sit the positive will be close to the board one side but furthest away on the other. This is so the wheels are not driving against each other later on. If this happens don't worry, we can just swap the wires around on the m1 or m2 block to counter it.


Screw them into the board m1 being left motor m2 being right.


Now you should have something looking like this


Next up to add a small power bank 2600-3000 mah should be fine you can put on more but you will need to think about weight issues.


This particular one in using is neat, an 18650 3000mah battery inside, thin and the lead that comes with it fits the pi and when needs charging can use the other way round and plug the lead into a USB charger and can charge it too.


As you see the standard USB is for powering the pi whilst the mini USB socket is for charging the power bank so at least you will always have the correct lead handy.

Using a cable tie I have tied it to the frame, you could use electrical tape or gaffa tape to do the same.  


There all done, don't forget to plug the wifi dongle into the pi, download the software and you're ready to go.

For adding software please take a look at this post:  http://smstextblog.blogspot.com/2014/05/the-ryanteck-budget-robot-adding.html


If you haven't bought one yet you can order via the tindie site the linky is https://www.tindie.com/products/Ryanteck/ryanteck-budget-robotics-kit-for-raspberry-pi/

Go and enjoy.

Monday, 12 May 2014

My blog hits 50 (K)

From a small blog I used to write about my geocaching adventures for those days I use to easily get 100+ geocaches each time I cached, I started to then also write about my experiences with the raspberry pi of which has steeply grown.

A time when a hundred views a week was lucky to today where I can have up to a hundred views an hour I have finally hit the 50,000 page view mark.

Along the way I have learnt many stuff with the raspberry pi and have shown many how much fun it can be.  I have written assembly guides to help those who are learning, product reviews of things I've bought and tried to projects I have made.  More recently I've been taken more seriously by the makers of pi add ons and have been extremely lucky that they have considered me to review or try out their merchandise, so a huge big thank you to these people as it's you too who have helped my blog become as successful as it is and hopefully even more over the coming years.

Lastly a big thank you to all my followers and those who comment it really gives me the motivation to write them up. I might not be brilliant with writing or English, yet I feel my own way of writing makes me unique and some what special that makes my blog stand out.

Thank you everyone big smiles all round :)

5 assembly guides for pi add on boards

The ryantek rtk001 board for controlling motors. http://smstextblog.blogspot.co.uk/2014/04/how-to-put-rtk-000-001-motor-control.html?m=1



Not actual pi add on but can be programmed with a pi afterwards the adafruit colour mini pov4 http://smstextblog.blogspot.co.uk/2014/05/colour-pov4-light-painter.html?m=1


Ten of my favourite pi projects this year

I tend to blog an awful lot and after a few weeks some of the best stuff tends to get pushed to the back of my blog away from viewers eyes, so as we are coming up to the half way mark through the year I thought I'd go back over some of my projects and in no particular order.

The raspwik was the first, it had something that no other project had up to this point and that was well documented instructions which led me to enjoy and actually perform all the projects listed.


The raspberry sat nav next which even featured on adafruit site, who needs a tomtom when you have this.


There was bitcoin mining on the pi.


The issabove project on kick starter that was hugely successful.


Time lapse photography was another that I've been doing on and off for the past year, yet really simply with these instructions.


But that soon led to using a pi noir camera and filming nighttime wildlife.


The next biggest thing was building my own robot, it's still not finished yet, but has had many hours of coding and time out into it.


Lastly was my modified model a pi, I needed to remove the av and sound blocks as they were not going to be used and to increase air flow etc to my airpi weather station.  However it soon came apparent that some thought it was a new pi which led me to do this blog post along with a comment right at the bottom to say it was actually a model a with bits removed. When you do read the blog have time to read some of the comments from people who jumped the gun and didn't read my comment at the bottom.




Ok so that was eight and not ten but. No doubt a couple more could work their way on here in the next few weeks. Thank you for reading.

Three pi boards to get you started.

Its not always who can get the most functions onto an add on board, but what has most potential and learning aspects.

So I decided to list the three that so far this year have impressed me.

3.  The sim pi from cyntech a board that contains a RGB led, buzzer and three button controller which comes with stickers http://smstextblog.blogspot.co.uk/2014/05/simply-simpie.html?m=1

2.  The fish dish a cheap three LEDs, button and buzzer shaped like a fish with access to the gpio pins. Ideal for those new to soldering and programming http://smstextblog.blogspot.co.uk/2014/02/fish-dish-pi-from-pi-supply.html?m=1

1.  Well what can I say, the more I see the pibrella and what can be done, the more I'm amazed as well as how quick and easy it is to program with simply programming commands.  LEDs, buzzer, nice red button and nothing to solder. Also has extras and could control a robot with its extra pins at the bottom, this is certainly the board you will need this year. 




Sunday, 11 May 2014

Programming the raspioduino part 1

Once you have assembled the board with my previous blog post ensure you have the jumpers connected as per picture.


Then following drogons posts on the following link add the ace dude and arduino IDE software. Ignore the bit about connecting the pins on the gertboard as this is all done with the jumpers, these can also stay in place after programming the chip although taking out sclk mosi and miso means you can then use these pins.

Here are the three links to follow:

https://t.co/ejatrN5Obp
https://t.co/C36MqAMX7f 
https://t.co/moSJoi9rKJ

Once done choose the arduino 328 with gpio for board and the programmer bring raspberrypi gpio.

Providing you have already run avrdude as per link above (and selected option 1) and have chosen the board and programmer you can now attach the led to pb5 and gnd open up blink, compile and upload and if all successful should blink on and off.

Of course I have tried programming arduino s in the past, however wasn't very successful. But thanks to Alex at raspio I have been able to write the above with information he has provided and hopefully will be useful to many others.

Assembly of the Raspioduino board

Alex from raspitv and hdmipi fame has been rather busy.  Not only does he have one of the most successful kick starter projects in history with the hdmipi, but also gpio breakout boards from the basic up to the pro which include on board fuses which I have talked about in a previous blog this month.

Anyway Alex had a gift for me being the new raspio duino which is still in beta stage and looks very promising.


This is the kit laid out us my own headers at the top as I wanted to make this so all points are protected against accidental touches or connections thus protecting it more.

This took me about thirty minutes to build and the pictures below will show this.


The gpio header was first, the chip holder was just the right size to balance the board for a good right angle fix for the gpio header.


Next up was the programming pins and main chip pins, keeping these straight should help in adding arduino add on boards but I'm yet to test this.


Next was to add the capacitors which looked like this.


As you will also see I have added a few extra bits but that didn't stop I decided to add a few more headers to make prototyping easier and an option I hope raspio will look at are the mini breadboards from the pihut which from memory I believe would fit on the remaining space on my prototyping area.


With a new pair of wire cutters you can see how tidy a good pair are in keeping the board looking tidy and clear from accidental shortings.



Now the board is made I will test it out and write up how to program it etc another day.