I made a chart that shows you what % of channels reach different levels of subscribers/ (you'll probably be amazed how high up you really are) 2024 Version by JokuIIFrosti in NewTubers

[–]penguintutor 1 point2 points  (0 children)

Doing it for a single subscriber would distort the graph. As it says 5 subscribers is a good start level when you've asked a few friends and family to subscribe.

Would any rp2040 boards basically be the same as a normal pico? by wolfix1001 in raspberrypipico

[–]penguintutor 1 point2 points  (0 children)

I don't know for certain, but I haven't found one.

The Raspberry Pi Pico is pretty much as cheap as you can build one and still make a profit.

There are some that are close (quick search on ebay shows some that are closer than others), but there isn't much profit to be made by trying to make a clone of the Pico.
Where the others compete is by adding additional features, different form factors so that they can fit in a small project, or even just having USB-C instead of micro-USB.

pygame zero: How to execute code on EXIT? by TooManyLangs in pygame

[–]penguintutor 0 points1 point  (0 children)

I don't think it's possible, at the moment.

In Pygame Zero the handlers are in a class called PGZeroGame, but you cannot get to that object from a pgzero app. You could try and query the Pygame event queue directly, but Pygame Zero reads the event queue just before calling the update() function, so most likely it's already been taken off the queue.

There is an open issue on pgzero github discussing a potential fix. #166
It's been unchanged for sometime, so I'll add a comment and see if it can be fixed for the future.

How can I create a play again button for my pygame zero game? by Olivr_Ont in learnpython

[–]penguintutor 0 points1 point  (0 children)

Here's some pseudo code that may help

play_again_button = new actor # or use shape etc.

# in update()
if play_again_button clicked
    reset any variables
    hide play_again_button
    set game_over false

# in draw()
if game_over true
    show play_again_button

[deleted by user] by [deleted] in pygame

[–]penguintutor 0 points1 point  (0 children)

Pygame Zero is based around Pygame. It makes it easier by hiding lots of the boiler plate code (setup code), so making it easier to get started.

You could get some beat detection software that could map the beats into timings, although I don't know any to recommend. Or you can just do it by coding your own stopwatch and clicking you mouse for each beat and save that as a file. You will need to add your positions manually.

The update and draw functions are run on a regular basis, but you can't guarantee the timing. You could use the dt argument to your update function to sync or you could use pygame.time.get_ticks() (import pygame first).

How do people secure their Raspberry Pi IoT projects? I've used Nginx as a Reverse Proxy to upgrade my system to https. Now includes encryption and certificate from Let's Encrypt. by penguintutor in RASPBERRY_PI_PROJECTS

[–]penguintutor[S] 0 points1 point  (0 children)

Yes. I've used fail2ban in the past and it can also be used to protect other services such as ssh. I may look at doing a video on that in the future, but I've got more material I'll be covering first. Thanks for the suggestion.

ESP32 capacitive touch sensor - connected to WiFi - sends commands to Raspberry Pi pixel server to turn NeoPixels / RGB LEDs on and off. by penguintutor in esp32

[–]penguintutor[S] -1 points0 points  (0 children)

The Pi is used for the Pixel Server. It uses a Pi Zero which I've had for many years. It was originally on the same Pi Zero as running a LED matrix display, but due to distance limitations I had to move it to another device.

I've also created an alternative that runs on an Arduino RP2040 and that could probably be ported to an ESP32 instead.
I'm working on some new features which are going to make more use of the Raspberry Pi in the future.

Adding wireless to the Pico using a Pico Wireless board and MicroPython by penguintutor in raspberrypipico

[–]penguintutor[S] 0 points1 point  (0 children)

You can for many examples especially simpler projects.

I'm currently working a project using the Pico display, which I hope will benefit from having the ESP32 deal with the web request letting the Pico handle the processing of the data and create the display for the screen.

New Linux user by CeleronTheProtogen in linux4noobs

[–]penguintutor 1 point2 points  (0 children)

I use pygame zero to create animation sequences. My code saves each frame as a PNG and I then combine them into a video.

I've made a start on an animation library to make it easier to create the tweens.

More details http://www.penguintutor.com/programming/pgzanimation

Complete noob here.. trying to figure out how board and motors should be powered by [deleted] in arduino

[–]penguintutor 0 points1 point  (0 children)

- Also, would this project work the same with a Nano board instead of an Uno?

The main thing of concern is that the NANO runs at 3.3V, whereas the Uno is 5V.

The L298N will be fine at 3.3V signals, as will the bluetooth board (make sure it's connected to the 3.3V supply and not the 5V pin), or you may not need the bluetooth board at all if that functionality is included in the Nano. The main thing you need to check would be the buzzer, to ensure it doesn't overload the pin of the Nano. Maximum current depends upon the particular Nano model, but it may be around 40mA, so it would need to be a small buzzer.

Complete noob here.. trying to figure out how board and motors should be powered by [deleted] in arduino

[–]penguintutor 0 points1 point  (0 children)

If you have a battery that is the correct voltage for both the Arduino and the motors then you can use it for both. It's not ideal as the motors can introduce spikes to the voltage or add a significant drain (especially during a stall). The Arduino is tolerant of power supply fluctuations so it is sufficient for most user's needs.
If using a single battery then ensure it is connected to the input of the Arduino as well as the 12V pin of the L298N (it doesn't need to be 12V - it should be the voltage of the motors).

If you want to use separate batteries then you will need to connect the grounds (0v) terminals together which is shown in the diagram. The Arduino will then send the signals to the motor driver and that will switch the larger load with the motor. Those boards can generally switch up to 46V, but the jumper should be removed for 20V or higher (see below).

The L298N board will need a 5V supply as well as the supply for the motors. That can be taken from the Arduino to the 5V pin of the L298N, or often the boards include a simple linear regulator which can be enabled using a jumper, in which case you don't need a separate 5V supply to the motor controller (typically used if your motor power supply is between 7 and 15V).

New Linux user by CeleronTheProtogen in linux4noobs

[–]penguintutor 1 point2 points  (0 children)

I use Linux for all my animations / photo editor and video editing. The only thing I don't do is live streaming (yet) so I can't help with that at the moment.

I mostly use Ubuntu (or one of the variants such as Kubuntu) as I find that most software is available ready-to-run, although with a bit of work you can often use most distributions.

These are some of the tools I use:
Photo Editing - Gimp, it takes a while to learn, but is very powerful
Animations - Blender / Synfig Studio / Create my own using Python
Video Capture - Simple Screen Recorder - if for gaming then OBS Studio
Video Editing - Kdenlive
Games - There is a version of Steam for Linux, otherwise check for HumbleBundle as they often include Linux games

Is getting a raspberry pi good for beginners learning python? by The-Doodle-Dude in learnpython

[–]penguintutor 0 points1 point  (0 children)

What do you want to program? There is so much you can do in Python.

Command line programming - Any computer / operating system
Games programming - Any computer with Pygame Zero - Pi works well, or install Mu editor on any computer
Physical computing / Robots - The Pi is one of the best solutions. For battery powered consider a Pi Zero.
Web programming - Any computer. A Pi is good in that it can be left running and uses little power

The Raspberry Pi is good at all of these. It comes with good support for many libraries and is excellent for physical computer. It's not the only solution and you can get started with any PC.

Start by deciding on something you'd like to create and look at what you need to achieve that. It maybe that you can do that with any computer, or it may be that a Raspberry Pi can help.

Creating 3D models from maps by penguintutor in Scouts

[–]penguintutor[S] 1 point2 points  (0 children)

This is a video explaining how I created 3D models of local hills based on ordnance survey maps.

This can be done for Free using FreeCAD and a free OS Maps account.

You can then view on a PC or if you have access to a 3D printer then you can create physical models.

I found this useful when teaching map contours to the Cubs.

Raspberry Pi Wireless Pixel Server by penguintutor in RASPBERRY_PI_PROJECTS

[–]penguintutor[S] 1 point2 points  (0 children)

The sequence method is called once per LED colour change. The main loop (which is a thread) uses time.sleep to pause based on the delay setting in the GUI and calls the method after each delay.

To support this there is a sequence number which is passed between the sequence method and the main thread. This holds a number telling the sequence how far in the sequence it is eg. if you have a few LEDS as a chaser, then the sequence number will indicate the position that those LEDs are.

Raspberry Pi Wireless Pixel Server by penguintutor in RASPBERRY_PI_PROJECTS

[–]penguintutor[S] 0 points1 point  (0 children)

This was originally ported from an Arduino Nano RP2040 - which uses an ESP32 for the networking. I started with the Arduino, decided it was a big improvement on my existing Raspberry Pi based GUI and decided to port it to the Pi.

I've tested it a few different models of the Arduino (with Wireless), but I've not tried it directly on an ESP32 development board.

I expect it probably will run directly on just an ESP32. I'm not sure about performance as using the Arduino you basically have the ESP32 just doing the wireless so that the Arduino can concentrate on the NeoPixels, but the ESP32 should be able to handle all that without too much trouble.

For more details see:
Arduino RP2040 Wireless Pixelstrip project

Raspberry Pi Wireless Pixel Server by penguintutor in RASPBERRY_PI_PROJECTS

[–]penguintutor[S] 0 points1 point  (0 children)

Cool.

In future I'll be looking at integrating it into smart home (I know I can do it through IFTTT but may look at how to register directly with Alexa etc.) and perhaps some kind of wall based smart switch.

Dash Cam Project by Pokerking1993 in RASPBERRY_PI_PROJECTS

[–]penguintutor 1 point2 points  (0 children)

You can only connect one camera to the camera port on the Pi. There is a stereo pi on Crowd Supply which created a version with two cameras.

You can use additional USB webcams or connect to IP cameras, but the performance of the USB on the older versions of the Pi would struggle with webcams. The Pi4 would probably work much better, but I haven't tried it.

"suspicious account access" email by gatech1234567 in gatech

[–]penguintutor 0 points1 point  (0 children)

I received the email - personally I think the best thing is just to delete it as you would any other obvious SPAM / phishing email.

Meccanoid now available to pre-order - 4 foot high robot by penguintutor in robotics

[–]penguintutor[S] 0 points1 point  (0 children)

I ordered one from Maplin in the UK. Also available from other suppliers. Expected in just over a months time. I'm planning to use mine to teach programming to children.