Some functionality of Astro Pi is only avalaible as supersuser. This notebook must be run from root account (at your own risk!)
From the console set the root password:
$ sudo passwd
$ sudo aptitude install sux
and login as superuser with enabled graphics:
$ sux
Link and execute the script
# ln -s /home/pi/bin/notebook.sh /usr/local/bin
# ipython.sh
After this you can open this notebook from the browser of an external computer with the url: http://rapberry.pi.ip:8888
WARNING: Your running as superuser!
In [4]:
from astro_pi import AstroPi
ap = AstroPi()
temp = ap.get_temperature()
print(round(temp,1))
In [3]:
from astro_pi import AstroPi
ap = AstroPi()
for i in range(100):
temp = ap.get_temperature()
temp=round(temp,1)
ap.show_message("%g" %temp, text_colour=(255, 255, 0), back_colour=(0, 0, 255))
ap.clear()
In [ ]:
Commit the changes from the terminal in the pi account with the command
$ git commit -am 'your message to describe the changes'