Go to advanced search

by Davespice
Wed Jul 01, 2015 12:04 pm
Forum: Astro Pi
Topic: Joystick and Push Buttons
Replies: 15
Views: 2602

Re: Joystick and Push Buttons

The joystick and the push buttons are separate and both will be present on the flight hardware. You can program both of these in any way you like. There is no plan to connect a keyboard or mouse to the Astro Pi on orbit which should guarantee that /dev/input/event0 will be the HAT joystick. The push...
by Davespice
Tue Jun 30, 2015 8:21 am
Forum: Astro Pi
Topic: Setup help
Replies: 2
Views: 832

Re: Setup help

I've seen this once or twice at a school when the sense HAT was not properly connected. I just needed to push it down a bit more and then a reboot fixed it. The only other thing I can think of is that you're using an old image of Raspbian that doesn't support device tree. Can I suggest you re-downlo...
by Davespice
Sun Jun 28, 2015 7:51 pm
Forum: Astro Pi
Topic: ap.set_pixels() error
Replies: 1
Views: 603

Re: ap.set_pixels() error

From a quick look at your code I can see you're not correctly building up a 64 length pixel array. line = 0 L = line side = [ L, L, L, L, L, L, L, L, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, ...
by Davespice
Sat Jun 27, 2015 7:56 pm
Forum: Astro Pi
Topic: Joystick Error
Replies: 3
Views: 934

Re: Joystick Error

Huge thanks in advance as I've spent almost three hours trying to fix it! :lol: :D The joystick works just like Up Down Left Right cursor keys, so it will also work outside of your program. You can move the menu highlight with it for example. Try this: import pygame import time from pygame.locals i...
by Davespice
Sat Jun 27, 2015 7:43 pm
Forum: Astro Pi
Topic: Joystick Help!
Replies: 3
Views: 1005

Re: Joystick Help!

Try this: import pygame import time from pygame.locals import * from astro_pi import AstroPi pygame.init() pygame.display.set_mode((640, 480)) ap = AstroPi() ap.clear() running = True x = 0 y = 0 ap.set_pixel(x, y, [255, 255, 255]) while running: for event in pygame.event.get(): if event.type == KEY...
by Davespice
Thu Jun 25, 2015 10:11 am
Forum: Astro Pi
Topic: How to calibrate the Magnetometer
Replies: 20
Views: 30969

Re: How to calibrate the Magnetometer

Folks, a slight change to the above instructions. As of version 1.1.5 of the Astro Pi python module you can copy the RTIMULib.ini file produced as part of the calibration to /etc and this will then be found and used by the Astro Pi python module, see notes here . This replaces step 21 and 22 above: ...
by Davespice
Thu Jun 25, 2015 10:04 am
Forum: Astro Pi
Topic: STICKY: Astro Pi software and drivers installation
Replies: 7
Views: 11897

Re: Astro Pi software and drivers installation

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 , onl...
by Davespice
Mon Jun 22, 2015 7:06 am
Forum: Picademy
Topic: VNC remote desktop via web browser
Replies: 55
Views: 114189

Re: VNC remote desktop via web browser

Hi Dave, I didnt know how to post a private message. The tightvnc still doesnt work for scratch even if you run a vnc client on the laptop?? Any ideas? Is there a not tight or full on version of vnc that might work? Thanks, pete Hi Pete, I haven't had a chance to look at this yet. I think the probl...
by Davespice
Mon Jun 22, 2015 6:55 am
Forum: Astro Pi
Topic: ImportError: cannot import name AstroPi
Replies: 14
Views: 3793

Re: ImportError: cannot import name AstroPi

Hi! There are two ways you can do the import. Like this: from astro_pi import AstroPi ap = AstroPi() Or like this: import astro_pi ap = astro_pi.AstroPi() The following code will not work because the module is named astro_pi (with an underscore). import AstroPi If the two methods above do not work I...
by Davespice
Sat Jun 20, 2015 9:51 am
Forum: Astro Pi
Topic: Joystick Help!
Replies: 3
Views: 1005

Re: Joystick Help!

Hi Joseph This is not as hard as you think. If you look at the example code here: https://www.raspberrypi.org/learning/astro-pi-guide/inputs-outputs/joystick.md In the program you have an x and y variable and you update this when the joystick is pressed in a particular direction. You just need to do...
by Davespice
Mon Jun 15, 2015 11:17 am
Forum: Astro Pi
Topic: astro pi board not detected anymore..
Replies: 2
Views: 943

Re: astro pi board not detected anymore..

It might be that your system clock was wrong and that made the https connection fail, if you use --no-check-certificate that makes it skip that check.

Code: Select all

wget https://www.raspberrypi.org/files/astro-pi/kinstall.tar.gz --no-check-certificate
sudo tar -C / -xvpf kinstall.tar.gz
sudo reboot
by Davespice
Sun Jun 14, 2015 8:59 am
Forum: Astro Pi
Topic: Joystick Problems
Replies: 7
Views: 1869

Re: Joystick Problems

You have to think of it as a keyboard plugged only into the Astro Pi. When you use Remote Desktop software the keyboard and mouse events from the client / viewing computer are sent over the network to the server which then actions them. If you were to type on a keyboard plugged into the Astro Pi you...
by Davespice
Thu Jun 04, 2015 8:26 pm
Forum: Astro Pi
Topic: Unable to take humidity reading
Replies: 2
Views: 1137

Re: Unable to take humidity reading

It means you just need to run the code as the super user, the please run as root / use sudo bit is telling you what to do. The notes you received with the Astro Pi explain this. Just open a terminal window and type in this command: sudo idle3 & Think of sudo as super-user-do , it's like Run as Admin...
by Davespice
Thu Jun 04, 2015 7:08 pm
Forum: Astro Pi
Topic: ap.show_letter('1')
Replies: 8
Views: 1472

Re: ap.show_letter('1')

I can see from the error you've posted it's still using an old version of the module. The part that says Astro_Pi_HAT- 0.0.2 -py2.7.egg. The version number now is 1.1.3. You may need to remove the old egg. See if that helps. sudo rm -r /usr/local/lib/python2.7/dist-packages/Astro_Pi_HAT-0.0.2-py2.7....
by Davespice
Thu Jun 04, 2015 6:55 pm
Forum: Astro Pi
Topic: ap.show_letter('1')
Replies: 8
Views: 1472

Re: ap.show_letter('1')

You need to run the commands in the previous message, copy/paste them into a terminal window. Those commands will update the Astro Pi python module which had a bug, once you've done that your code will run as is without need for change.
by Davespice
Thu Jun 04, 2015 8:50 am
Forum: Astro Pi
Topic: ap.show_letter('1')
Replies: 8
Views: 1472

Re: ap.show_letter('1')

Okay I have fixed it and it's checked in. You'll need to run these commands in order to pull the changes and update the installed copy of the python module (your Pi must be online). cd ~/astro-pi-hat git fetch origin git reset --hard origin/master sudo python setup.py install sudo python3 setup.py i...
by Davespice
Thu Jun 04, 2015 8:31 am
Forum: Astro Pi
Topic: ap.show_letter('1')
Replies: 8
Views: 1472

Re: ap.show_letter('1')

Ah no! This is a bug... it took me a while to work out what was going on. It happens because you send the character 1 into show_message before you send it into show_letter . So if you add the line below to my example program above, it re-creates the bug. Well done old chap, you found one! ap.show_me...
by Davespice
Thu Jun 04, 2015 7:48 am
Forum: Astro Pi
Topic: ap.show_letter('1')
Replies: 8
Views: 1472

Re: ap.show_letter('1')

Does this program work for you?

Code: Select all

#!/usr/bin/python
import time
from astro_pi import AstroPi

ap = AstroPi()

for i in reversed(range(0,10)):
    ap.show_letter(str(i))
    time.sleep(1)
by Davespice
Wed Jun 03, 2015 2:22 pm
Forum: Astro Pi
Topic: Astro Pi Temperature Sensor Reading
Replies: 64
Views: 42881

Re: Astro Pi Temperature Sensor Reading

Is there a way to get a true air temp from the astro pi. Anyone else seeing this problem? Are they doing something wrong . i.e. does it need calibrating? Hi there, I'll try to answer these below. Not without doing your own calibration. As jdb said some heat conducts through the copper top fill of t...
by Davespice
Wed Jun 03, 2015 7:41 am
Forum: Astro Pi
Topic: Accessing astro-pi via Scratch
Replies: 1
Views: 1100

Re: Accessing astro-pi via Scratch

Correct, that is all you would need to do. Then it would be a case of sending broadcast messages from Scratch which are then matched in the python and forwarded to the relevant part of the Astro Pi module.
by Davespice
Wed Jun 03, 2015 7:30 am
Forum: Astro Pi
Topic: Astro Pi Idea
Replies: 2
Views: 1225

Re: Astro Pi Idea

Hi there, if you want to do a time lapse, or similar, I would suggest maybe 30 seconds or 1 minute apart. Any more than that and you'll see large jumps in the terrain moving by below. To give yourself an idea about how fast the ground appears to move just go on YouTube and search for ISS cupola vide...
by Davespice
Tue Jun 02, 2015 10:53 am
Forum: Picademy
Topic: VNC remote desktop via web browser
Replies: 55
Views: 114189

Re: VNC remote desktop via web browser

Folks, I just found an issue with the instructions. An extra step is now needed to make sure that it pulls the websockify repository, I've updated the instructions in the original post to reflect this.
by Davespice
Fri May 29, 2015 10:29 pm
Forum: Astro Pi
Topic: Got The pi and pi noir cameras, not being detected
Replies: 9
Views: 1875

Re: Got The pi and pi noir cameras, not being detected

Correct. It will disable the LED matrix.
by Davespice
Thu May 28, 2015 8:24 pm
Forum: Astro Pi
Topic: Got The pi and pi noir cameras, not being detected
Replies: 9
Views: 1875

Re: Got The pi and pi noir cameras, not being detected

This stuff is not specific to Astro Pi, five minutes on Google beforehand would have gone a long way ;) So it sounds like you may have connected it backwards, which can result in a dead camera. Tin connectors should face away from the Ethernet port (on all versions of the Pi). Please read this page ...
by Davespice
Wed May 27, 2015 2:45 pm
Forum: Astro Pi
Topic: Joystick Problems
Replies: 7
Views: 1869

Re: Joystick Problems

Hi I have just set-up my Astro Pi! However, I do not know how to use the joystick in my program. What is the code for when i move it one way, it does something. Eg. If the joystick is pressed down, start a game. Thanks! :D :geek: Have a read of this guide: https://www.raspberrypi.org/learning/astro...

Go to advanced search