Go to advanced search

by kdamav7949
Tue May 15, 2018 12:55 am
Forum: Python
Topic: Use 2 devices withe the i2c ports
Replies: 5
Views: 390

Re: Use 2 devices withe the i2c ports

I think that will work, thanks! :D
by kdamav7949
Mon May 14, 2018 10:17 pm
Forum: Python
Topic: Use 2 devices withe the i2c ports
Replies: 5
Views: 390

Re: Use 2 devices withe the i2c ports

If it uses SPI, then it still covers up the I2C ports. Is there any way that I would be able to connect the screen and the Wii Nunchuck?
by kdamav7949
Mon May 14, 2018 8:02 pm
Forum: Python
Topic: Use 2 devices withe the i2c ports
Replies: 5
Views: 390

Use 2 devices withe the i2c ports

Hi. I recently bought an LCD screen for my raspberry pi. I knew nothing about hooking up screens other than HDMI to the pi, so I just randomly ordered one. So turns out it hooks up to the pi by GPIO. I have gotten the screen to work just fine. I am trying to build a project that uses a Wii Nunchuck ...
by kdamav7949
Sat Jul 22, 2017 3:52 pm
Forum: General discussion
Topic: Vnc server access through webpage
Replies: 0
Views: 224

Vnc server access through webpage

Hi, I have a raspberry pi with pixel desktop, vnc server was pre installed. I can use my vnx account to access my pi from anywhere in the world, as long as I install vnc veiwer. I will be out of town soon, is there anyway for me to access my pi without installing vnc veiwer (maybe veiwing through a ...
by kdamav7949
Fri May 19, 2017 1:56 pm
Forum: Python
Topic: Code slows down
Replies: 2
Views: 487

Re: Code slows down

I'm guessing your looseHealth() function is using 100% CPU. You should probably use pygame.event.wait() instead of "get()". ( note! wait() return single even not a list of events. ) You should probably also use pygame.event.set_allowed()/set_blocked() to only receive the type of events you need. I ...
by kdamav7949
Sun May 14, 2017 7:22 pm
Forum: Python
Topic: Code slows down
Replies: 2
Views: 487

Code slows down

Hi. I am making a game. For the fighting mechanics, the target is supposed to move around a certain area on the screen. When the target is clicked, it loses one health. When I run this code, it is extremely slow. When I comment out the code that registers the click and takes away health, the program...
by kdamav7949
Sun May 07, 2017 7:20 pm
Forum: Python
Topic: Pygame Colorkey
Replies: 1
Views: 570

Pygame Colorkey

I am trying to upload an image with pygame. Assuming I have already set up pygame, the color variables, and uploaded the image, this is what I want to happen: myImage.set_colorkey(Red, Green) I want all the colors except red and green to show. How can I do this? Here is the code: def imgTitleLogo(se...
by kdamav7949
Tue Apr 18, 2017 11:45 am
Forum: Python
Topic: Person Finder Code
Replies: 9
Views: 931

Re: Person Finder Code

Ok, thanks for all the help everybody....
by kdamav7949
Tue Apr 18, 2017 11:03 am
Forum: Python
Topic: Person Finder Code
Replies: 9
Views: 931

Re: Person Finder Code

Also, you appear to be using global variables but not declaring them as global inside functions. It works as long as you don't assign to those variables within functions. You will run into problems when you assign to one in a function as then Python will instead create a local variable with the sam...
by kdamav7949
Mon Apr 17, 2017 7:36 pm
Forum: Python
Topic: Person Finder Code
Replies: 9
Views: 931

Re: Person Finder Code

Thanks for all the help.... It worked great.... :D :D :D
by kdamav7949
Mon Apr 17, 2017 3:27 pm
Forum: Python
Topic: Person Finder Code
Replies: 9
Views: 931

Person Finder Code

I am creation a person searcher program. I should be able to use filters to find a person in the list. All of the code except this is working: if filterList[numOfFiltersC] == "1": #Characters in Name charInName = int(raw_input("How many letters in the name?")) counterVAR = 0 personOn = 0 beforePeopl...
by kdamav7949
Mon Apr 04, 2016 12:56 am
Forum: Python
Topic: How to program YwRobot LCD Screen
Replies: 1
Views: 958

How to program YwRobot LCD Screen

Hi. I have a YwRobot Arduino LCM1602 IIC V1 LCD screen for my raspberry pi. It has 4 pins: GND, VCC(5v), SDA(GPIO 2), and SCL(GPIO 3). When I connect the LCD screen to my Pi, the backlight comes on, but I can't figure out how to program it(even after hours of google searching! ;) :? :? ) . I am OK w...
by kdamav7949
Sat Nov 21, 2015 8:41 pm
Forum: General discussion
Topic: pi not working
Replies: 3
Views: 629

pi not working

Hi. My rasbain just does not load. I get to the part where it has the 4 raspberry pi logos on top and lots of startup messages but then, I get sent to a black screen with a line in the top left corner (like its loading) but nothing happens.
by kdamav7949
Tue Nov 10, 2015 12:32 pm
Forum: Python
Topic: program not working correctly
Replies: 3
Views: 542

Re: program not working

The input will probably be a string, that is typing 1 will return a string with the ASCII 1 character which is hex 31. Either convert the string to an integer using the int function or compare the input with a string E.g. either use playerChoose = int(input('What space do you choose? ')) or if play...
by kdamav7949
Tue Nov 10, 2015 12:08 pm
Forum: Python
Topic: program not working correctly
Replies: 3
Views: 542

program not working correctly

Hi. I have a python program not functioning correctly. #import stuff import thread import RPi.GPIO as GPIO import time import random as R #setup GPIO GPIO.setwarnings(False) L1a = 2 L1b = 3 L1c = 4 L2a = 14 L2b = 15 L2c = 18 L3a = 23 L3b = 24 L3c = 25 Dbutt1 = 17 GPIO.setmode(GPIO.BCM) GPIO.setup(L1...
by kdamav7949
Sun Nov 08, 2015 10:38 pm
Forum: Python
Topic: running a while loop and other lines of code
Replies: 5
Views: 1035

Re: running a while loop and other lines of code

A program only has one path of execution. Your code is in an effectively infinite loop in keepflashing , as flashon can't change within the loop. Two solutions off the top of my head. 1) Make a function called flash that doesn't loop and only flashes when flashon is true . Call flash from your othe...
by kdamav7949
Sun Nov 08, 2015 10:27 pm
Forum: Python
Topic: running a while loop and other lines of code
Replies: 5
Views: 1035

Re: running a while loop and other lines of code

You need somethign in the while loop that changes the value of "flashon" to false. This will cause the while loop to terminate, keepflashing function will then return and the message will be printed. But you will need something altogether more complicated to achieve your goal of flashing a led AND ...
by kdamav7949
Sun Nov 08, 2015 10:15 pm
Forum: Python
Topic: how do I do a soft shutdown from python?
Replies: 4
Views: 1095

Re: how do I do a soft shutdown from python?

danjperron wrote:import os

os.system("sudo shutdown -h now")
thanks that also helps me with my code
by kdamav7949
Sun Nov 08, 2015 10:11 pm
Forum: Python
Topic: running a while loop and other lines of code
Replies: 5
Views: 1035

running a while loop and other lines of code

Hi. I am trying to make an led flash but at the same time, execute other code. flashon = True def keepflashing(pin): while flashon: GPIO.output(pin, True) time.sleep(0.23) GPIO.output(pin, False) time.sleep(0.23) The variable flashon is set to True This command will let me have an led flash until I ...
by kdamav7949
Fri Oct 30, 2015 10:59 am
Forum: Camera board
Topic: Camera does not work
Replies: 0
Views: 822

Camera does not work

Hi. My raspberry pi camera does not work. I tries to use raspi-config but each time I do it, nothing happens. :( When I run a python program using the camera with python 2 I get this error message: mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM) mmal: mmal_compo...
by kdamav7949
Sat Oct 17, 2015 12:30 am
Forum: General discussion
Topic: Raspbian keeps getting corrupted
Replies: 2
Views: 539

Raspbian keeps getting corrupted

Hi. My rasbain keeps getting corrupted. It has gotten corrupted 3 times already. I would like to know how to fix that. If it is a problem with the operating system, please fix it. If not, is there any other good operating system that can access GPIO and the raspi camera. If so, I can just use that t...
by kdamav7949
Fri Oct 02, 2015 11:03 pm
Forum: General discussion
Topic: Pi Does not Work
Replies: 7
Views: 1030

Re: Pi Does not Work

ctrl-alt-f2 login and move you file to your backup device then we'll see what the real problem is Thank you but my mouse and keyboard do not work either. When u startup, pressing and holding shift opens recovery mode. Recovery mode justs puts you in the installation setup. The mouse and keyboard wo...
by kdamav7949
Tue Sep 29, 2015 11:06 am
Forum: General discussion
Topic: Pi Does not Work
Replies: 7
Views: 1030

Pi Does not Work

Whenever I startup my pi it turns on correctly but when I boot to the desktop I cant do anything and EVERYTHING except for the background and 1 of the desktop icons start to move up and down. PLEASE HELP ME!!!!!!!!!!!!!!!!!! I have lots of python programs on my pi that i dont want to lose. If I do n...
by kdamav7949
Tue Sep 29, 2015 11:01 am
Forum: General discussion
Topic: Why are some GPIO giving 3.3V at startup?
Replies: 8
Views: 1302

Re: Why are some GPIO giving 3.3V at startup?

Yeah. I have the same problem with most of my pins. I have a really cool application that I want to test but it uses leds. The leds come on at startup and the only way to turn them off is to shut down the pi. Please help! :| :| :| :geek: I think I have a model b rev 2(it might be called raspi 2)
by kdamav7949
Mon Sep 28, 2015 11:38 am
Forum: General discussion
Topic: gpio pins dont work
Replies: 2
Views: 507

gpio pins dont work

Hi. Whenever I connect an led or something to the gpio pins on the raspi, the led turns on the moment the pi turnes on and does not turn off until I turn the pi off. Why does this happen? Please help me.

Go to advanced search