Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

Programming the Raspberry Pi


Gina

Recommended Posts

I have two Raspberry Pi boards - A Pi 2 and a Pi 3 which I would like to use for astro stuff and/or 3D printer control.  I gather these can have versions of Linux installed.  I have used Python to program Linux machines in the past mainly running Ubuntu or Linux Mint though may be a bit rusty now.  Am I thinking along the right lines?  Could someone give me some hints on using the Pi, please?

Link to comment
Share on other sites

  • Replies 67
  • Created
  • Last Reply

Thanks both :)  Ubuntu and Mint are also flavours of Debian so I guess and software written for those will work provided the hardware is considered.

Link to comment
Share on other sites

There is a newer OS called Ubuntu Mate which has got good reviews and has been recently updated to handle the new wireless devices on the Pi 3. I stick with Raspbian myself because it's the OS the Raspberry Pi Foundation promote.

To put the image onto the SD card you will need something like win32diskimager if you need to write the SD card from Windows.

Link to comment
Share on other sites

I run Ubuntu Mate on my Pi2. I've got PHD2 and INDI drivers installed. I've also set it up with a USB stick as the root disk. Any software has to be compiled for the ARMVn to work. Many folks use Python to program the Pi.

Link to comment
Share on other sites

For a 3D printer there are custom made application that support given family of "makers" 3D Printers, not much Python there. As for Astronomy and Python - depends what part of astronomy. To some extent you can script some hardware in Python - like some cameras (more on x86 Windows thanks to ASCOM APIs). For general astronomy there are libraries like pyephem that can calculate stuff and you can then use that data to make for example charts and what not. Raspberry 2 will be slow, 3 somewhat faster. There are also some for handling FITS and alike files.

Any non-trivial idea will require a lot of time and good to excellent Python/Linux programming skills. Software development takes time.

Link to comment
Share on other sites

Yes, the ones I have been looking at are class 10 and thinking of 16Gb or 32Gb.  I shall want room for 4GB video files for my all sky camera.  I have ideas for other uses of the RPi 3 boards.  Once I get one working I'll think about buying more.

Link to comment
Share on other sites

Its worth reading this: https://www.raspberrypi.org/blog/pi-3-booting-part-i-usb-mass-storage-boot/

I've set up my Pi2 with bootcode.bin and config.txt on the SD card. The image is installed on the USB stick (which has the MBR)

I did this because when setting up a headless Pi I was reimaging the SD card regularly after having to shut down the Pi by removing power when things did not work right. Since moving the MBR to the USB stick I've not had to do this. Can't say I've seen an improvement in read/write time though.

Only suggesting it as you seem to know your way around Linux

Link to comment
Share on other sites

I've ordered this one :- SanDisk Ultra 32Gb microSD preloaded with Raspbian for Raspberry Pi   Looks like it should be ready to go and quick delivery (Prime delivery tomorrow - last one).

If I decide to buy more Pi 3s I should be able to buy empty micro SD cards and copy the image across and save a bit.  Also, if I find I want more space I can buy up to 128GB cards.

Link to comment
Share on other sites

14 hours ago, Gina said:

a micro SD card ready loaded with NooBs (and Raspbian) as my broadband speed is dire. 

An interesting topic Gina, thanks, I had not paid the Pi much attention till now but the Pi3 with wireless could be very interesting indeed

What size is NooBs and Rasbpbian to download I wonder ?

You were commenting earlier about various Linux OSes and I had a quick google here&there out of curiosity and see that PuppyLinux is mentioned on a Wiki as being OK with it. I've used that in the past (a long time in the past ! so I'll be quite rusty by now, it was CD sized back then !! ) to great effect on FlashDrives ( it is optimized to minimize write cycles and is also quite small ) dont know if that may be of interest to you. Just an idle thought :)

 

Link to comment
Share on other sites

I think it's about 1GB.  I know I could have left it to download all night but I'd still need a micro SD card to put it on - much easier to buy a ready done SD card too.  I'm getting something like 0.5 to 1Mbps download speeds ATM so at 1Mbps it would take 8,000s or just over 2 hours.  Not as bad as a full Linux distro though.

I too tried Puppy Linux some years ago - nice and small and fast.  I was in with Ubuntu when it started and carried on using and updating until it went off-track IMO and I went over to the Mint fork.  I have been using Mint since but found Windows pretty much needed when I got into astro imaging in a big way so went back to that.  Now I'm so fed up with slow speeds and crashes and with Linux really coming to the fore in astronomy, it's time to return to my favourite OS.

Although I'm familiar with Linux I've got a bit rusty and decided to buy Raspberry Pi For Dummies from Amazon and both refresh my Linux and take in Raspberry Pi at the same time. 

I was going to change over to Linux for my observatory setup anyway but if I can replace the laptop with an RPi or maybe two so much the better.  I could mount it/them on the imaging rig and save a lot of wiring.  I'm also considering a separate widefield mini second observatory and the RPi would be ideal for that.

Link to comment
Share on other sites

21 minutes ago, Gina said:

I think it's about 1GB. 

Ah ! thanks, yes, I came back to post that I had found it, and you had already done so :)  It looks like zip  1.0G for Noobs+Rasbpbian and 1.3G for Rasbpbian.  Was going to say that it is available via torrent as well  (nowt worse than getting partway thro a zip and then failing to resume )  which would have done you for an overnighter !! but a bit too late on parade, sorry :)

Interesting, yep, been there and Tshirts with all sorts - Mint was the first one that could handle my internet hardware ( obscure winmodems and 3G dongles :( )

Link to comment
Share on other sites

On 9.08.2016 at 14:24, Gina said:

II was going to change over to Linux for my observatory setup anyway but if I can replace the laptop with an RPi or maybe two so much the better.  I could mount it/them on the imaging rig and save a lot of wiring.  I'm also considering a separate widefield mini second observatory and the RPi would be ideal for that.

What is controlled currently by Windows? ;) It's not easy to just switch to Linux for astronomy.

Link to comment
Share on other sites

Looks like I shall want a display screen for the RPi to program it.  Keyboard and trackball/mouse can plug into USB ports.  Display options are HDMI or dedicated display.

Link to comment
Share on other sites

3 hours ago, Gina said:

Looks like I shall want a display screen for the RPi to program it.  Keyboard and trackball/mouse can plug into USB ports.  Display options are HDMI or dedicated display.

Or run it headless through SSH or VNC.  You'd still need USB keyboard and mouse and HDMI monitor/TV for the initial setup but from then on just use SSH or VNC.

Ian

Link to comment
Share on other sites

A few more thoughts (probably obvious so nothing smart or clever so sorry)

1. Before using your SD card (given that downloading is too slow for your broadband) make an image backup so if you want to start again for any reason you can just restore back to the "as delivered" image.

2. I've no idea on the update schedule to Raspbian but if you have a slow broadband I'd expect there to be some updates to download.

3. From memory my Raspbian did not include a VNC server.  It's an easy download/install with the apt-get.

4.  I was a complete novice Linux wise and found internet searches came up with answers to my questions very quickly - loads of resources on the internet.

Ian

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.