Go to advanced search

by Bernd54Albrecht
Wed Feb 26, 2020 12:52 pm
Forum: Python
Topic: 2 little games "Moves-of-a-knight"
Replies: 0
Views: 105

2 little games "Moves-of-a-knight"

Happy Birthday, Raspberry Pi! I have a little present for your users: Moves-of-a-knight 2 little Python games with pawns and a knight Game 1 (Moves_of_a_knight.py): Select a number of pawns between 1 and 63. Take the knight to capture the pawns, which do not move in this game. No feedback on minimum...
by Bernd54Albrecht
Fri Oct 25, 2019 1:18 pm
Forum: Camera board
Topic: RPi Cam Web Interface
Replies: 5146
Views: 1451352

Re: RPi Cam Web Interface

Thanks, you encouraged me to try it once more. And it works.
by Bernd54Albrecht
Thu Oct 24, 2019 12:31 pm
Forum: Camera board
Topic: RPi Cam Web Interface
Replies: 5146
Views: 1451352

Re: RPi Cam Web Interface

RPi Cam Web Interface worked fine for almost 2 years. However, with the upgrade to Buster, it does not any longer. Following the error message: start monitoring for pid: 5008 {2019/10/13 18:35:06} start monitoring for pid: 5008 RaspiMJPEG Version 5.9.1 h264 search /var/www/html/media/vi_0000_2019101...
by Bernd54Albrecht
Tue Aug 27, 2019 7:51 pm
Forum: Gaming
Topic: Hamurabi reloaded
Replies: 0
Views: 491

Hamurabi reloaded

Who remembers Hamurabi on the Commodore C64? From the information in Wikipedia and my memory I wrote the progam code for this game in Python. Initially as a text based economic strategy game with lot of room for improvement (see remarks at the end of the code). Feel free to play and comment. #! /usr...
by Bernd54Albrecht
Thu Aug 08, 2019 5:22 pm
Forum: General discussion
Topic: The Raspberry Pi 4 is fast – and hot!!!
Replies: 20
Views: 4364

Re: The Raspberry Pi 4 is fast – and hot!!!

Thanks for all your xxx comments. I am just happy with my 2 Euro solution (CPU=44°C), and I wanted to share it with the community. Again: The Pi 4 is a super Computer, but it requires cooling. Note: There is a nice video with Rob Zwetsloot on cooling. Amendment: I bought 2 mini fans, one with 12Volt...
by Bernd54Albrecht
Sat Jul 27, 2019 2:11 pm
Forum: General discussion
Topic: The Raspberry Pi 4 is fast – and hot!!!
Replies: 20
Views: 4364

The Raspberry Pi 4 is fast – and hot!!!

It will not overheat – the clock rate will be reduced instead. But what is the sense in it? I placed the CPU Temperature Monitor in the panel and checked the temperature under various conditions. With RasPi4 in the official case and normal use, there were temperatures above 80°C, with open case stil...
by Bernd54Albrecht
Wed Feb 27, 2019 4:21 pm
Forum: The MagPi
Topic: Pong reloaded // MagPi77 //pygamezero
Replies: 7
Views: 2874

Re: Pong reloaded // MagPi77 //pygamezero

That was it! Many thanks to Mark. Attached the revised code: # pong game # source MagPi 77, pages 32 - 35 # modified by Raspberry Pi course at JFS Bad Bramstedt, Germany # with the decisive contribution by MarkyV # also thanks to Lucy Hattersley # BALLSPEED starts rather slow, but increases every 60...
by Bernd54Albrecht
Tue Feb 26, 2019 12:50 pm
Forum: The MagPi
Topic: Pong reloaded // MagPi77 //pygamezero
Replies: 7
Views: 2874

Re: Pong reloaded // MagPi77 //pygamezero

I replaced the screen.draw.text statement with the full function draw. No joy! I ran the debugger in Thonny -> error message, see attached screen shot. Thonny - -home-pi-PyGameZero-pong_gettingFaster.py @ 132 - 1_001.png pgzrun obviously does not support the debugger. The missing link to the above i...
by Bernd54Albrecht
Tue Feb 26, 2019 10:10 am
Forum: The MagPi
Topic: Pong reloaded // MagPi77 //pygamezero
Replies: 7
Views: 2874

Re: Pong reloaded // MagPi77 //pygamezero

Correction: # pong game # source MagPi 77, pages 32 - 35 # modified by Raspberry Pi course at JFS Bad Bramstedt, Germany import pgzrun import random from gpiozero import MCP3004 import math from time import time, sleep # neu pot1 = MCP3004(0) pot2 = MCP3004(1) # Set up the colours BLACK = (0 ,0 ,0 )...
by Bernd54Albrecht
Tue Feb 26, 2019 10:08 am
Forum: The MagPi
Topic: Pong reloaded // MagPi77 //pygamezero
Replies: 7
Views: 2874

Re: Pong reloaded // MagPi77 //pygamezero

Thanks for the reply.
However, my problem is not the missing t in text. This word was divided by the first attempt to attach a photo, which was placed in the middle of the code. So, this part must be deleted.
by Bernd54Albrecht
Sat Feb 23, 2019 9:15 am
Forum: The MagPi
Topic: Pong reloaded // MagPi77 //pygamezero
Replies: 7
Views: 2874

Pong reloaded // MagPi77 //pygamezero

Pong is an excellent example for using MCP3004/3008 as well as for pygamezero. We like that "old" game from 1972. However, there is always room for improvement. My pupils wanted to change the BALLSPEED and have a winner, when a certain score is reached. Therefore, we amended the code as attached. BA...
by Bernd54Albrecht
Wed Feb 06, 2019 5:18 pm
Forum: Raspberry Pi Desktop for PC and Mac
Topic: install wolfram-engine minecraft-pi cups
Replies: 2
Views: 622

Re: install wolfram-engine minecraft-pi cups

Thanks for the assistance.
CUPS issue solved, the problem was between the ears!
(Printer in Home network, Raspi Desktop in the newly installed Guest network)
B54A
by Bernd54Albrecht
Wed Feb 06, 2019 9:19 am
Forum: Raspberry Pi Desktop for PC and Mac
Topic: install wolfram-engine minecraft-pi cups
Replies: 2
Views: 622

install wolfram-engine minecraft-pi cups

Eventually I found a retired notebook computer and installed the Raspbian Desktop. - Amazing! More memory; faster than the Pi 3B; GPIO pins available through a Pi Zero without µSD-card; Python games running etc. However, could not install wolfram-engine (Mathematica) and minecraft-pi. This may be a ...
by Bernd54Albrecht
Wed Mar 28, 2018 6:59 pm
Forum: Troubleshooting
Topic: SenseHAT
Replies: 6
Views: 784

Re: SenseHAT

Hi, look at https://pinout.xyz/pinout/sense_hat# SenseHAT uses basically I2C (pin 3 and 5). I propose to find a sensor for SPI or at least different I2C-address. Use i2cdetect -y 1 to see addresses in use. Next issue would be to find access to the unused pins. I soldered an extra long header to the ...
by Bernd54Albrecht
Thu Oct 05, 2017 7:17 pm
Forum: Python
Topic: gpiozero button_when pressed reference to function
Replies: 4
Views: 1314

Re: gpiozero button_when pressed reference to function

As promised, here the finalized game "Turtle race with four buttons" on GPIO 6, 13, 19 and 26. Again, thanks for the help # # Turtle race with four buttons to be pressed as often as possible # Random steps of 7 to 9 units per click # Raspberry Pi Course at Jürgen-Fuhlendorf-Schule, Bad Bramstedt, Ge...
by Bernd54Albrecht
Thu Oct 05, 2017 9:31 am
Forum: Python
Topic: gpiozero button_when pressed reference to function
Replies: 4
Views: 1314

Re: gpiozero button_when pressed reference to function

Thank you very much indeed. You clearly identified the problem with the main thread. I introduced variables namestep in the functions and a while True loop with if namestep!=0 So the part of moving the turtles when the respective button is pressed works now, next challenge is the finish line. When t...
by Bernd54Albrecht
Wed Oct 04, 2017 9:09 am
Forum: Python
Topic: gpiozero button_when pressed reference to function
Replies: 4
Views: 1314

gpiozero button_when pressed reference to function

During the OOP-Course, I tried to improve the turtle race with four buttons. According to Gpiozero documentation 1.4.0 page 7 the code should be button1.when_pressed = lauraforward # with lauraforward = the function to move the turtle laura Code does not move the turtles, does not stop, but displays...
by Bernd54Albrecht
Wed Jul 20, 2016 9:18 am
Forum: Deutsch
Topic: RaspberryPi 3 Drucker installieren
Replies: 8
Views: 26382

Re: RaspberryPi 3 Drucker installieren

Hallo,
(fast) alles ist richtig beschrieben.

Wegen fehlender Zugriffsrechte vor dem Aufruf der Seite http://localhost:631/admin
folgenden Befehl im Terminal ausführen:

sudo usermod -a -G lpadmin pi

Damit wird der user pi zum admin für den line printer =lpadmin
by Bernd54Albrecht
Mon Feb 15, 2016 10:48 am
Forum: Teaching and learning resources
Topic: new Python game for beginners
Replies: 5
Views: 2616

Re: new Python game for beginners

Thanks for the new idea, rurwin Here the current version of our Python Code with first digit between 1 and 9, following digits between 0 and 9. Audio output to ear phones (3.5mm) with os mpg321 and mp3 files named Orion0.mp3 to Orion9.mp3 in a directory called Repeat_sequence. #!/usr/bin/python3.4 #...
by Bernd54Albrecht
Mon Feb 15, 2016 8:44 am
Forum: Teaching and learning resources
Topic: new Python game for beginners
Replies: 5
Views: 2616

Re: new Python game for beginners

Hello, thanks for your interest. My idea is to teach beginners how to develop a program from the first idea, find the algorithm, test it with a few lines of Python Code, then improve it with safe input, comments and proper output. And games are well received by children. Here the player has to repea...
by Bernd54Albrecht
Sun Jan 03, 2016 10:13 am
Forum: Troubleshooting
Topic: SenseHAT
Replies: 6
Views: 784

Re: SenseHAT

Thanks for the advice. I spent some time on reading and trying out.
Best results with attaching the SenseHAT via a ribbon cable and of course calibration.
Even temperature readings were pretty close.
All the best for 2016.
by Bernd54Albrecht
Thu Dec 31, 2015 4:49 pm
Forum: Troubleshooting
Topic: SenseHAT
Replies: 6
Views: 784

Re: SenseHAT

Thanks for the reply. I'll try asap (next year!) What kind of calibration are you talking of? I simply mounted the SenseHAT and connected the power supply. With the latest Raspbian, the Python module was available and worked well. But I did not calibrate the sensors and have not read any advice how ...
by Bernd54Albrecht
Thu Dec 31, 2015 12:01 pm
Forum: Troubleshooting
Topic: SenseHAT
Replies: 6
Views: 784

SenseHAT

My second SenseHat has obviously the same problem as my first - or am I wrong??? With a stationary RasPi and a little Python program to interrogate orientation or other related values (compass, compass_raw, gyroscope) I get always different values, when I expect almost constant values. Is there a pr...
by Bernd54Albrecht
Tue Nov 10, 2015 7:46 pm
Forum: Teaching and learning resources
Topic: new Python game for beginners
Replies: 5
Views: 2616

Re: new Python game for beginners

Thanks for the advice. Now I found the button #!/usr/bin/python3 #---------------------------------------------------------------- # file name: Simulate1to9.py # Remember the number # Idea based on Al Sweigarts Simulate # [email protected].com # 01.11.2015 #--------------------------------------...
by Bernd54Albrecht
Tue Nov 10, 2015 4:14 pm
Forum: Teaching and learning resources
Topic: new Python game for beginners
Replies: 5
Views: 2616

new Python game for beginners

For my new RasPi Course, after the introduction of while loops, the task is to develop a game on the basis of Al Sweigarts Simulate, but the pattern consists of numbers. I was surprised how simple the code is and I can offer it to other teachers. #!/usr/bin/python3 #---------------------------------...

Go to advanced search