Labels

Showing posts with label RPiTips. Show all posts
Showing posts with label RPiTips. Show all posts

Friday, December 12, 2014

Stupid RPi Tip #5 - Conversion of SD Cards

I was able to convert an SD card from an RPi B (my work MediaPi) to a micro-SD card for an RPi B+.  I had gone through the trouble of putting some drivers on the regular 8GB SD card and I didn't want to lose the configurations that had already been done when converting over to an RPi B+.  The key to all of this was the use of Win32 Disk Imager and raspi-config.  The normal use of the Win32 Disk Imager is explained below:

Using Win32 Disk Imager
-----------------------------------
*** extracting an image file from an SD card ***
-- launch Win32 Disk Imager
-- load SD card
-- switch dropdown on right to the SD card that was loaded
-- select the file folder icon
--- go to the directory that you want and set a file name <filename>.img
--- click OK
-- you should see the location for the image file filled in, and Device being SD card
-- click on the Read button
-- when the file is finished, exit the program
-- you now have an image file of the SD card

-----------------------------------
*** pushing an image file to an SD card ***
-- launch Win32 Disk Imager
-- load SD card
-- switch dropdown on right to the SD card that was loaded
-- select the file folder icon
--- go to the directory with the image file, select it
--- click OK
-- you should see the location for the image file filled in, and Device being SD card
-- click on the Write button
-- when the file is finished writing to the SD card, exit the program
-- you now have an SD card with the image written on it


I followed the directions above marked "extracting an image file from an SD card" with the 8GB SD card to make an image.  I then followed the "pushing an image file to an SD card" with the 16GB micro-SD card to copy that image.  Once the RPi B+ system booted up, I then used raspi-config to expand the image to fill the entire micro-SD.  Problem solved - now back to troubleshooting.  I think I am now going to work on an SSH tunnel back to my house.

Saturday, March 30, 2013

Stupid RPi Tip #4 - write it down!

If you are an experimenter like me, you try all kinds of crazy things.  More often than not, you will have more than one experiment going on at a time.  The nice thing about the Raspberry Pi is that it is so easy to change out one to do a different experiment with by simply replacing the SD Card.  This also means that sometimes you loose your place in what you were doing before and trying to remember something that you were working on two weeks ago becomes a challenge.  Answer to the dilemma, write what you do down.  I am speaking of keeping a notebook or a journal or an online notepad of some sort.  Anything that will give you the chance to regain your thoughts on where you were six months ago on a project.  Obviously this means that you need to be able to put down more than 160 characters at a time.  Think of the things you can do:

1. you can record what your ultimate goal is and what path you hope to use to accomplish that goal
2. you can record what prompted you to try this very thing
3. you can record what things you learned, and what resources you used (like SD Card numbers)
4. you can record if this particular time you were successful or not - even Thomas Edison failed over a 1000 times before he got the right combination of components to make a lightbulb, his notebooks were very handy to keep him from redoing what already didn't work
5. you can record what you hope to do in the next iteration
6. if you become famous the notes are very valuable for your memoirs and if you patent something the notes will hold up in a court of law

Tuesday, February 19, 2013

Stupid RPi Tip #3 - have a standard setup in mind

Along with the idea of tagging the SD Cards, you should always have a standard setup in mind when putting together a fresh SD card.  I would go with the following elements (assuming a Raspbian build):
(1) setup the SD card to expand the partition to the limit of what is available on the SD card (from "sudo raspi-config")
(2) make sure that the keyboard is setup for your country (in my case I changed the /etc/default/keyboard from "gb" to "us")
(3) turn on SSH access (from "sudo raspi-config")
(4) install a VNC server (from "sudo apt-get install tightvncserver")
(5) boot up in  GUI mode (from "sudo raspi-config")
(6) setup wireless access, if you normally connect this way, otherwise Ethernet is usually better (I keep an Ethernet hub on the table with my RPis).

Stupid RPi Tip #2 - mind your power sources

I have learned a few things about power sources over the years. One, you never want to be on the hairy edge of any power input or output requirement and two, current is additive at times. You will deal with a lot of 5 volt sources to power the RPi(s) and usually any USB hub(s) that you have around, not to mention the monitor and powered speakers.  So how do we deal with this?

Make sure that you pay attention to the current draw from the RPi.  The USB ports only allow for 150 ma draw and exceeding that value also affects the ethernet port; not to mention the damage that it might cause (there is no overcurrent protection).  I would start by only connecting powered USB hubs to the USB ports on the RPi.  In that way, you are pretty much assured that you will not be drawing too much current from the port.  However, be careful - I have heard reports that there are some older hubs that try to draw the normal 500 ma from the main USB port connection.

The problem with current USB hubs is that you don't know how much current that they will normally provide.  The package typically will not tell you what the power supply is capable of delivering.  Sometimes, you have to do a little extra research to find out.  E.g., when you are standing in the store about to pick up the USB hub, do a check with your smart phone to find out if there are some specs available on the model.  A lot of times you will see a 5volt/1 amp power supply for a 7-port USB hub.  Do the math, if the spec says that the USB port should supply 500 ma, then there is no way that a 1 amp (1000 ma) supply is sufficient.  Finding hubs capable of supplying the spec level current is very hard.  I have an old 4-port Belkin hub that has a 5 volt/2.5 amp supply - it has the capability of supplying the specified current on each port with some extra.

If at all possible find hubs that have supplies that are powered by 5 volt supplies.  The reason is that eventually you may want to power the hub with a 5 volt battery that would also powers the RPi.

Sunday, February 17, 2013

Stupid RPi Tip #1 - Tag Your SD Cards

SD cards are becoming more and more available in larger and larger sizes for cheap. As a result, you may find yourself deciding to keep separate experiments on different cards. This often results in a plethora of cards laying around on the table along with their holders in separate piles. I am exaggerating here but I have 10 SD cards lying on my test setup table right now. The other problem is that you are constantly adding things to the images and even overwriting the card contents. We have already learned what to do with keeping disk drives organized, but what about these cards?
What I have learned to do is to label the cards and the SD card containers. I serialize each card by attaching a label with a number (one up from the previous numbered card). This can be done to the front or the back (if it's on the back, you can read the number when it's in the RPi). I make sure that the number is in ink, I don't put anything else on the card itself. I can always refer to this specific card because it has a unique number. In fact, as I am taking notes on an experiment, I can refer to it as SD#n, and i don't get confused. On the SD card case, I put a label strip but now I switch to a pencil and put the version of the original image (e.g., Raspian 10/28/12) along with the number on the SD card (circled in pencil). As I make changes to what is on the card, I can add the change in pencil.
Trust me, this will keep you from getting confused about what card goes with what project. The SD card slot does not interfere with the label as long as the label is on the front. It doesn't have to be a big label, only big enough to have the number on it.

Update:  I found out that Avery 5412 labels can be used on both a micro-SD and the adapter.  I would use them to record the number of the SD card and put what version and changes on the label in the cover.  In this case, the micro-SD label will show up on the bottom and is visible so that you know which SD is in the RPi.