Go to advanced search

by babybigfox
Fri Feb 26, 2016 4:52 pm
Forum: Astro Pi
Topic: Do not wait for show message to finish
Replies: 1
Views: 1180

Do not wait for show message to finish

I have a program that relies on the joystick always being active, and if I call the function show_message(), it stops the system till the text has finished scrolling. Is there a way to stop it doing this and do it in the background? Thanks
by babybigfox
Wed Feb 24, 2016 6:58 am
Forum: Python
Topic: Glob not functioning in terminal
Replies: 4
Views: 1023

Re: Glob not functioning in terminal

Yes! That works when I give the full path. If I cd to Astro_Pi/MP3_Player and then run it works too. It probably couldn't find the song's folder!
Thanks :D
by babybigfox
Tue Feb 23, 2016 5:00 pm
Forum: Python
Topic: Glob not functioning in terminal
Replies: 4
Views: 1023

Re: Glob not functioning in terminal

Absolute paths don't make a difference in glob(). Here is what I am getting in the terminal... Songs found: [] Volume is now 1.0/1 Traceback (most recent call last): File "Astro_Pi/MP3_Player/player.py", line 106, in <module> pygame.mixer.music.load(random.choice(songs)) File "/usr/lib/python2.7/ran...
by babybigfox
Tue Feb 23, 2016 4:36 pm
Forum: Scratch
Topic: Sound in Python Games, no sound in Scratch
Replies: 7
Views: 2461

Re: Sound in Python Games, no sound in Scratch

The same thing happened to me. I could not use any of the sounds. Try and import your own sounds from a memory stick or download them and see if that works. PM me if it doesn't work.
by babybigfox
Tue Feb 23, 2016 4:17 pm
Forum: Python
Topic: Glob not functioning in terminal
Replies: 4
Views: 1023

Glob not functioning in terminal

I am writing my Astro Pi MP3 Player competition entry and I am using the glob module to search for songs. I originally trialed it in the Python Shell but since I added GPIO input I have had to run it in the terminal. Here is some of my entry: #! /usr/bin/env python # Import the SenseHAT libraries an...
by babybigfox
Fri Jul 03, 2015 6:27 pm
Forum: Staffroom, classroom and projects
Topic: Chickens!
Replies: 5
Views: 2219

Re: Chickens!

by babybigfox
Tue Jun 30, 2015 5:40 am
Forum: Astro Pi
Topic: Help
Replies: 2
Views: 681

Re: Help

Thanks :D
by babybigfox
Mon Jun 29, 2015 3:52 pm
Forum: Astro Pi
Topic: Help
Replies: 2
Views: 681

Help

Hi, I want this snippet of my code to generate a random order of 4 RGB lists: colors = [[255 , 0 , 0] , [255 , 255 , 0] , [255 , 0 , 255] , [0 , 255 , 0]] and display them so that, separately with a 1 second gap, one is on the top strip, one different color on the right, bottom, and left. I have tri...
by babybigfox
Sun Jun 28, 2015 2:55 pm
Forum: Astro Pi
Topic: ap.set_pixels() error
Replies: 1
Views: 588

ap.set_pixels() error

Error: I am trying to code my entry for the astro pi competition. My coding brings up a error when i use set_pixels. I don't know if it's a bug, or just my code. ;) Any help? This should rotate a randomly generated coloured stripe around the matrix, wait for a generated time and then display a rand...
by babybigfox
Mon Jun 08, 2015 4:03 pm
Forum: Astro Pi
Topic: Variables in list index numbers
Replies: 3
Views: 926

Re: Variables in list index numbers

Thanks. What about:

Code: Select all

person = 1
usertemp = [ '0',  '1', '2' ]
ap.show_message('Temperature:' + usertemp[person])
by babybigfox
Mon Jun 08, 2015 3:32 pm
Forum: Astro Pi
Topic: Variables in list index numbers
Replies: 3
Views: 926

Variables in list index numbers

Part of the code for my astro pi project contains a pickle which saves data about users. How would I specify an index number using a variable? Here's an example of my code

Code: Select all

data = [ A, B, C ]
person = 1
print(data[person])
This should print B.
Any help?
Thanks :D
by babybigfox
Fri Jun 05, 2015 5:08 am
Forum: Astro Pi
Topic: ap.show_letter('1')
Replies: 8
Views: 1433

Re: ap.show_letter('1')

It works very well. Thanks :D
by babybigfox
Thu Jun 04, 2015 7:03 pm
Forum: Astro Pi
Topic: ap.show_letter('1')
Replies: 8
Views: 1433

Re: ap.show_letter('1')

I have updated the libraries like you said and it still comes up with: Traceback (most recent call last): File "ReactionPi.py", line 182, in <module> menunum() # Start the whole program! File "ReactionPi.py", line 84, in menunum write() # Enter pressed File "ReactionPi.py", line 159, in write ap.sho...
by babybigfox
Thu Jun 04, 2015 6:54 pm
Forum: Astro Pi
Topic: ap.show_letter('1')
Replies: 8
Views: 1433

Re: ap.show_letter('1')

Could you resend my code fixed like you said as I am new to python and don't really understand...
by babybigfox
Thu Jun 04, 2015 5:54 am
Forum: Astro Pi
Topic: ap.show_letter('1')
Replies: 8
Views: 1433

ap.show_letter('1')

This problem has now been solved: ************************************************************************************************ Why won't the countdown work? If you do it for the first time - for the pickle to set up - [*] scroll to n and enter it. [*] Then scroll to one You should just be able t...

Go to advanced search