Go to advanced search

by louiepi
Sat Dec 29, 2018 5:53 pm
Forum: Python
Topic: Scrolling Background With Player
Replies: 1
Views: 295

Scrolling Background With Player

I am trying to make the background scroll with the player. The background image should scroll with the player. The width of the stage is is twice the width of the image. So the player starts at the left of the screen then moves to the right as the right arrow key is pressed, until it reaches the mid...
by louiepi
Fri Dec 28, 2018 9:21 pm
Forum: Python
Topic: Python Pygame Collisions
Replies: 5
Views: 362

Re: Python Pygame Collisions

You can describe what you've tried until you are blue in the face, but until you show your code there is no means by which anyone can tell you where you are going wrong. So please show us your code. PeterO OK here is what I have done so far for one side but it does not work well when I add it fir a...
by louiepi
Fri Dec 28, 2018 7:12 pm
Forum: Python
Topic: Python Pygame Collisions
Replies: 5
Views: 362

Re: Python Pygame Collisions

What code do you have so far? Basic collision detection with circles and squares should just be a case of simple distance calculations. I have been trying to do this by checking one side at a time, checking, for example for the top side of the square, if the bottom of the circle is below the top of...
by louiepi
Fri Dec 28, 2018 4:39 pm
Forum: Python
Topic: Python Pygame Collisions
Replies: 5
Views: 362

Python Pygame Collisions

I am trying to make a very simple moving game in python with pygame. I have made it so you can move in a room which is made of a number of tiles. I can't get collisions to work correctly and so was wondering if there was an efficient way to get collisions to work. I won't post the code as what I hav...
by louiepi
Sat Feb 24, 2018 2:20 pm
Forum: Python
Topic: rfid sensor error
Replies: 3
Views: 629

Re: rfid sensor error

You need to be careful what you write to the tag. The tags have security features. They have a CRC code written in to (off memory) the last 6 bytes in each bock of memory storage. This CRC code is used in the Authentication hand shake when you try to write or read to the rfid tag. The tags usually ...
by louiepi
Sat Feb 24, 2018 9:49 am
Forum: Python
Topic: rfid sensor error
Replies: 3
Views: 629

rfid sensor error

I am trying to use an RFID sensor with the raspberry pi. I followed the tutorial below to set it up. https://pimylifeup.com/raspberry-pi-rfid-rc522/ After writing the code which should read and write to the tags I ran it. It works once it seems but then it gives the following error AUTH ERROR!! AUTH...
by louiepi
Thu Feb 22, 2018 7:20 pm
Forum: Python
Topic: controlling a servo
Replies: 1
Views: 401

controlling a servo

I am trying to control a servo using the GPIO pins. If I run the following code then the servo moves fine from the centre to the right and then to the left. It repeats this fine. import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setup(10, GPIO.OUT) p = GPIO.PWM(10, 50) p.start(7.5) try...
by louiepi
Mon Feb 12, 2018 5:41 pm
Forum: Python
Topic: pir motion camera
Replies: 10
Views: 1907

Re: pir motion camera

GPIO4 is also used for 1-wire interface if this is active I would interfere with the input of your PIR. Try moving you PIR to another gpio and adjust your program accordingly. These GPIO's are not used by anything else. 5,6,12,13,16,17,18,19,20,21,22,23,24,25,26,27 Thank you for the help. I changed...
by louiepi
Mon Feb 12, 2018 1:45 pm
Forum: Python
Topic: pir motion camera
Replies: 10
Views: 1907

Re: pir motion camera

pcmanbob wrote:
Mon Feb 12, 2018 12:52 pm
According to the documentation gpiozero uses BCM numbering so you should be connecting to gpio 4 or pin 7

https://gpiozero.readthedocs.io/en/stable/recipes.html
Sorry if I was unclear but that is where it is connected
by louiepi
Mon Feb 12, 2018 12:45 pm
Forum: Python
Topic: pir motion camera
Replies: 10
Views: 1907

Re: pir motion camera

pcmanbob wrote:
Mon Feb 12, 2018 12:33 pm
OK, so which gpio are you using for the motion sensor input ?
The sensor runs into pin 4
by louiepi
Mon Feb 12, 2018 11:57 am
Forum: Python
Topic: pir motion camera
Replies: 10
Views: 1907

Re: pir motion camera

Hi. You have not stated which PIR you are using but assuming the common HC-SR501 are you sure you have it connected correctly as there are several versions available that have the 5v and ground connections reversed. If you look for the reverse connection protection diode normally red/orange that is...
by louiepi
Mon Feb 12, 2018 9:32 am
Forum: Python
Topic: pir motion camera
Replies: 10
Views: 1907

pir motion camera

I am using a PIR sensor along with the raspberry pi camera. The idea is to record a video each time the sensor detects movement. I have the PIR sensor attached to the 5v and ground pins and also pin 4. There is an LED attached to pin 2 which should light up when movement is detected. The code is set...
by louiepi
Sun Jan 28, 2018 2:39 pm
Forum: Troubleshooting
Topic: kali liinux stuck on /dev/sda1 clean
Replies: 1
Views: 1071

kali liinux stuck on /dev/sda1 clean

I wanted to install kali linux onto my raspberry pi but thought that I would install it first onto another computer. I downloaded the iso file used win32 disk imager to write it to a usb stick. Put it in the computer and followed the graphical install steps. However at the end it says to reboot to l...
by louiepi
Thu Jan 25, 2018 8:29 pm
Forum: Python
Topic: interact with another program
Replies: 1
Views: 300

interact with another program

In python I want to be able to interact with another program. For example in excel I would like to be able to click in a specific place such as on an ok button. Also I would want to be able to add text into that window. How can I go about doing this.
by louiepi
Thu Jan 25, 2018 3:33 pm
Forum: Python
Topic: change position of canvases inside a canvas
Replies: 1
Views: 390

change position of canvases inside a canvas

In tkinter I want to have multiple canvas widgets, which will each hold different items. I want to be able to bring each of the in front of the others so my idea was to use the lift and lower. I thought you could only do this for items in a canvas so each of these canvases are in a main canvas. If I...
by louiepi
Sun Jan 14, 2018 9:05 pm
Forum: Python
Topic: tkinter bind a function to a canvas
Replies: 0
Views: 243

tkinter bind a function to a canvas

I am trying to call a function when any part of a canvas is clicked on. I can use canvas.bind('<ButtonPress-1>', toTab) This works, even if where I am clicking is on top of a canvas item, such as a rectangle. However if I place a label in the canvas with label = tk.Label(canvas, text='label', backgr...
by louiepi
Wed Jan 10, 2018 8:28 pm
Forum: General discussion
Topic: installing a program from source
Replies: 6
Views: 607

Re: installing a program from source

What do I do with the source code in order to play the game.
by louiepi
Wed Jan 10, 2018 7:00 pm
Forum: General discussion
Topic: installing a program from source
Replies: 6
Views: 607

installing a program from source

I want to install a program on my raspberry pi, not tetris 2, which is here

http://stabyourself.net/nottetris2

I would need to make it form the source I presume so how would I go about doing so. Thanks in advance for any help.
by louiepi
Sat Jan 06, 2018 10:12 pm
Forum: HATs and other add-ons
Topic: cam jam robotics board
Replies: 4
Views: 840

Re: cam jam robotics board

I have a cam jam robotics kit. I was wondering which of the GPIO pins are used by the motor control board which goes on the pins. Thanks in advance for any help. The worksheets associated with the kit explain this clearly. See https://github.com/CamJam-EduKit/EduKit3/raw/master/CamJam%20EduKit%203%...
by louiepi
Sat Jan 06, 2018 9:46 pm
Forum: HATs and other add-ons
Topic: cam jam robotics board
Replies: 4
Views: 840

cam jam robotics board

I have a cam jam robotics kit. I was wondering which of the GPIO pins are used by the motor control board which goes on the pins. Thanks in advance for any help.
by louiepi
Tue Jan 02, 2018 7:13 pm
Forum: General discussion
Topic: ssh to raspberry pi without a password
Replies: 6
Views: 2306

Re: ssh to raspberry pi without a password

Is there a way to do it which doesn't require setting these up.
by louiepi
Tue Jan 02, 2018 7:01 pm
Forum: General discussion
Topic: ssh to raspberry pi without a password
Replies: 6
Views: 2306

ssh to raspberry pi without a password

I know how to ssh to a pi form another one. ssh [email protected] It then asks for the password of the user on that pi your are accessing. I have a pi where I have a user which had the password raspberry. I then deleted the password with sudo passwd user -d If I then try to ssh to that pi it asks for the ...
by louiepi
Tue Jan 02, 2018 10:12 am
Forum: General discussion
Topic: running a circuit from the 3v gpio pin
Replies: 5
Views: 719

Re: running a circuit from the 3v gpio pin

Thanks very much for the help. I have a mutimeter so will measure the current.
by louiepi
Tue Jan 02, 2018 8:49 am
Forum: General discussion
Topic: running a circuit from the 3v gpio pin
Replies: 5
Views: 719

Re: running a circuit from the 3v gpio pin

It depends on what current your small circuit needs. From a 2,500mA supply, 1,200mA is taken by the USB, 900mA by the RPi3B the rest is available for driving things from the 3V3 pins, pin#1 and pin#17 (which are connected together). The circuit is the receiving side of a doorbell. It has the LED wh...
by louiepi
Mon Jan 01, 2018 7:46 pm
Forum: General discussion
Topic: running a circuit from the 3v gpio pin
Replies: 5
Views: 719

running a circuit from the 3v gpio pin

I have a small circuit which runs off 2 AA batteries. I was wondering of I could connect it to the 3v and ground pins on the raspberry pi. I know that this powers it but is it still safe for both the circuit and the raspberry pi. Thanks in advance for any help.

Go to advanced search