User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1662
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

STICKY: Astro Pi software and drivers installation

Tue May 05, 2015 1:43 pm

Hi folks,
If you won an Astro Pi kit from phase one of the competition then you will have a pre-installed SD card that is now quite out of date (as of August 2015) and it is advised that you update your SD cards to the latest version of Raspbian.

The Astro Pi python module has also been replaced with the Sense HAT one here. It is also advised that people migrate away from the old Astro Pi python module (which will never be updated again) to using this new Sense HAT one (which will).

Install: http://pythonhosted.org/sense-hat/

The module is backwardly compatible with the old Astro Pi python module by way of an alias.

So where you have:

Code: Select all

from astro_pi import AstroPi
ap = AstroPi()
You can just change astro_pi to sense_hat like so:

Code: Select all

from sense_hat import AstroPi
ap = AstroPi()
And the rest of your code should just work. We put this in to allow people with large bodies of Astro Pi specific code to easily migrate to the new module. It's also a good way for your code to self describe that it relates to the Astro Pi mission.
Last edited by mahjongg on Sat Jul 22, 2017 5:49 pm, edited 7 times in total.

User avatar
topshed
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 85
Joined: Mon Feb 04, 2013 12:05 pm
Location: Surrey
Contact: Website

Re: Astro Pi software and drivers installation

Thu Jun 04, 2015 8:20 pm

If your school or workplace uses a web proxy you may need to tell git about it in order for the updates to work.
You can type:

Code: Select all

git config --global http.proxy http://your.proxyserver.com:8080
or

Code: Select all

git config --global http.proxy http://proxyuser:[email protected]:8080
if the proxy requires a username and password.
--
Richard Hayler - Citizen Science Programme Manager

User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1662
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

Re: Astro Pi software and drivers installation

Thu Jun 25, 2015 10:04 am

Folks, the latest update to the Astro Pi python module has an important change with regards to the RTIMULib.ini file. Up untill now this file would just appear in every folder where you stored or run your Astro Pi programs. It has now been moved to the home folder and will, as of version 1.1.5, only exist in one place. This is the path:

Code: Select all

~/.config/astro_pi/RTIMULib.ini
After upgrading to 1.1.5 you can safely delete all the various copies of RTIMULib.ini that you've got floating around on your file system. There is also some added logic that will check for a system wide copy of RTIMULib.ini in /etc
If the file is found in /etc and you don't have a copy in ~/.config/astro_pi then the file in /etc is copied to ~/.config/astro_pi and will be used forever after that. This can be helpful if you want to calibrate your Magnetometer as described in this topic.

The Astro Pi module will also auto detect the LED Matrix frame buffer device number, so if you had another screen like one of those Adafruit TFT screens as well as the Astro Pi then no conflicts will occur. There is also a new error that can be raised if the module is unable to find the Sense HAT frame buffer device, this will happen if the drivers are not installed or the Sense HAT is not connected.

Code: Select all

OSError: Cannot detect RPi-Sense FB device

User avatar
topshed
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 85
Joined: Mon Feb 04, 2013 12:05 pm
Location: Surrey
Contact: Website

Re: Astro Pi software and drivers installation

Thu Jul 02, 2015 8:56 am

Be aware that if you update using

Code: Select all

sudo pip-3.2 install astro_pi --upgrade
sudo pip install astro_pi --upgrade
You'll probably find that the latest version of numpy is also downloaded and installed as part of the process

The build stage takes about 25 minutes on a Raspberry Pi 2 ,so this is probably not an activity to undertake at the start of a lesson!
--
Richard Hayler - Citizen Science Programme Manager

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2011
Joined: Thu Jul 11, 2013 2:37 pm

Re: Astro Pi software and drivers installation

Thu Jul 16, 2015 2:21 pm

As of the 15th July firmware/kernel update, the Sense HAT should now work after performing a sudo rpi-update operation. Support (for the LED matrix and joystick input) is now included by default.

RTIMUlib is still required to talk to the temperature/humidity, pressure and IMU sensors.
Rockets are loud.
https://astro-pi.org

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5717
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Astro Pi software and drivers installation

Wed Aug 26, 2015 9:09 am

Quick note that rpi-update is no longer required. Up to date documentation can be found here:
https://pythonhosted.org/sense-hat/
https://github.com/raspberrypi/document ... /README.md

Founder71
Posts: 1
Joined: Thu Oct 29, 2015 8:02 am

Re: Astro Pi software and drivers installation

Thu Oct 29, 2015 8:06 am

Very simple to install.

I can use the Python scripts from the command line but they dont work from a script in a web page hosted on Apache2, i cant find any examples anywhere. Anyone tried this yet?

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5717
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Astro Pi software and drivers installation

Thu Oct 29, 2015 10:43 am

That would be a permissions issue, so I'd recommend getting the hang of users, groups and permissions on linux.

Return to “Astro Pi”