Search found 37 matches
- Tue Feb 10, 2015 9:04 pm
- Forum: Python
- Topic: Curses robot
- Replies: 3
- Views: 1195
Re: Curses robot
I have got my code working. I changed so the GPIO pins were on for 0.1 seconds. It did work that way. Because if I hold the key it read an input every 0.01 secondisch and because the "else" statement killed it so quick the motors didn´t react.
- Tue Feb 10, 2015 8:47 am
- Forum: Automation, sensing and robotics
- Topic: Curses robot
- Replies: 1
- Views: 554
Curses robot
So, I Have built a robot using the amazing Ryanteck MCB and it can run "precoded " code. But I am trying to make a program that controls the robot with the keyboard using Curses. I have kind of succeeded, but not really. I have made this program: while True: #if w is pressed: #make robot g...
- Tue Feb 10, 2015 8:45 am
- Forum: Python
- Topic: Curses robot
- Replies: 3
- Views: 1195
Curses robot
So, I Have built a robot using the amazing Ryanteck MCB and it can run "precoded " code. But I am trying to make a program that controls the robot with the keyboard using Curses. I have kind of succeeded, but not really. I have made this program: while True: #if w is pressed: #make robot g...
- Mon Feb 09, 2015 8:18 pm
- Forum: Python
- Topic: Curses+GPIO=failure
- Replies: 3
- Views: 924
Re: Curses+GPIO=failure
This is my complete code. #!/usr/bin/python3 #importing modules import RPi.GPIO as GPIO import curses import time #setting up the pins GPIO.setmode(GPIO.BCM) GPIO.setup(17,GPIO.OUT) GPIO.setup(18,GPIO.OUT) GPIO.setup(22,GPIO.OUT) GPIO.setup(23,GPIO.OUT) #init curses and set it up stdscr = curses.ini...
- Mon Feb 09, 2015 8:05 pm
- Forum: Python
- Topic: Curses+GPIO=failure
- Replies: 3
- Views: 924
Curses+GPIO=failure
So, I Have built a robot using the amazing Ryanteck MCB and it can run "precoded " code. But I am trying to make a program that controls the robot with the keyboard using Curses. I have kind of succeeded, but not really. I have made this program: while True: #if w is pressed: #make robot g...
- Wed Feb 04, 2015 6:27 pm
- Forum: Python
- Topic: The Curses Module
- Replies: 2
- Views: 2278
Re: The Curses Module
Thank you! I think I will work à out à good program from this!
- Tue Feb 03, 2015 7:59 pm
- Forum: Python
- Topic: The Curses Module
- Replies: 2
- Views: 2278
The Curses Module
So, I hage build a robot that can run pre-written code. But I want to take to to a new level. I have found out that the easiest way to create à program that reads keypresses and then does something is to use Curses. The problem is that I haven't got my program to work and I can't find anything on th...
- Fri Jan 23, 2015 1:47 pm
- Forum: General discussion
- Topic: Blink
- Replies: 2
- Views: 516
Blink
Does anyone know what it means when the power led is blinking on the Pi?
- Wed Jan 14, 2015 8:15 pm
- Forum: Python
- Topic: Reading key presses
- Replies: 2
- Views: 1931
Re: Reading key presses
Okay, now i understand what was wrong! =)
- Wed Jan 14, 2015 7:52 pm
- Forum: Python
- Topic: Reading key presses
- Replies: 2
- Views: 1931
Reading key presses
Hi! So I am making a Raspberry Pi controlled robot and now I am working on the software for the control of it. I want to make a program that reads keyboard presses and uses it as a signal to make the motor spin. The problem is that the module I have found out is the best alternative is from a librar...
- Tue Dec 23, 2014 2:08 pm
- Forum: Troubleshooting
- Topic: Scratch while SSH
- Replies: 5
- Views: 1089
Scratch while SSH
So, I am using a Pi B+ with Raspbian. I am usually SSHing to it because I do not have an appropriate HDMI monitor so I am using my iMac as a screen. This have worked pretty well and I am able to use most programs and stuff this way. I have never used Scratch but it seems pretty fun so I thought, why...
- Wed Nov 05, 2014 7:18 pm
- Forum: Troubleshooting
- Topic: SSH
- Replies: 1
- Views: 467
SSH
Hi! I use to SSH to my Pi from my iMac. I plug the Pi into the computer, I turn on Internet sharing from Wi-Fi to ethernet and then SSH to it. I have done it for over a year now. But yesterday when i tried to SSH to it didn't work. I have not changed any settings that possibly could have disturbed i...
- Mon Nov 03, 2014 6:55 am
- Forum: Python
- Topic: Controlling Lego Bot
- Replies: 5
- Views: 1057
Re: Controlling Lego Bot
Okay, I am kind of worried right know. There were only jumper wires between the motor and the Pi. Do you think that i have damaged the pi now?
- Sun Nov 02, 2014 9:01 pm
- Forum: Python
- Topic: Controlling Lego Bot
- Replies: 5
- Views: 1057
Re: Controlling Lego Bot
What is the code supposed to do? At the moment it runs once through a sequence of calls that twiddle the status of a couple of GPIO pins. Also you've defined it to use BCM (Broadcom pin numbering). BCM GPIO13 is physical PIN#33 & BCM GPIO5 is physcial PIN#29 (on a B+) neither of those pins exis...
- Sun Nov 02, 2014 7:51 pm
- Forum: Python
- Topic: Controlling Lego Bot
- Replies: 5
- Views: 1057
Controlling Lego Bot
Hi! I am working on a project right know. I am building a Lego Bot. I have constructed the Bot itself and I have just started the motor part. I am pretty sure this code is correct, but it is not working. I am using Python 2.7.3. #importing time and gpio libraries import time import RPi.GPIO as GPIO ...
- Fri Oct 24, 2014 7:56 pm
- Forum: Python
- Topic: How to use "or"
- Replies: 6
- Views: 1504
Re: How to use "or"
Sorry for being a bit rude. Thanks Doug! I thinks this is the third time you fix my problems.DougieLawson wrote:You need to test variable against value on both sides of the OR statement.
Code: Select all
if (variable == "value1") OR (variable == "value"): do_something_for_a_positive_compare()
Thank you!
- Fri Oct 24, 2014 7:46 pm
- Forum: Python
- Topic: How to use "or"
- Replies: 6
- Views: 1504
Re: How to use "or"
if (answer == "valid answer#1") or (answer == "valid answer#2"): do_something_positive() else: do_something_else() I don't really understand what you mean. But if you mean that I need an else statement you're wrong. There is an else statement but I didn't include it in the part ...
- Fri Oct 24, 2014 7:40 pm
- Forum: Python
- Topic: How to use "or"
- Replies: 6
- Views: 1504
How to use "or"
Hi! I'm not a total beginner in python, I know the basics if you know what I mean. Right now I am working on a text-base adventure game. I want there to be two ways of typing the decision in. while True: answer = raw_input("You have to decide. Do you want to continue, or not") answer = ans...
- Wed Oct 22, 2014 1:53 pm
- Forum: Troubleshooting
- Topic: buzzing noise while using th. 3.5mm output
- Replies: 2
- Views: 1946
buzzing noise while using th. 3.5mm output
So I got a new Raspberry pi model b+ a couple of days ago, I am very happy with it. I have just started my robot-making project and I wanted to create some cool sounds to it. So I started making some music in the Raspberry Pi. When I plugged my earphones in to listen to it, I noticed a buzzing noise...
- Tue Oct 21, 2014 8:29 pm
- Forum: General discussion
- Topic: What to do next?
- Replies: 6
- Views: 1110
Re: What to do next?
If you want to open the GUI (Graphical User Interface) type . Then the desktop will show up and you will be able to start programs like LXTerminal by double-clicking on them.
Code: Select all
startx
- Sat Oct 11, 2014 8:02 pm
- Forum: Troubleshooting
- Topic: wrong password
- Replies: 3
- Views: 852
Re: wrong password
If you don't have anything of value on the SD card you can re-install the OS.
Otherwise it will get kind of tricky...
Otherwise it will get kind of tricky...
- Mon May 12, 2014 5:06 pm
- Forum: Python
- Topic: Minecraft Pi Edition API
- Replies: 5
- Views: 1575
Re: Minecraft Pi Edition API
Thank you for the help but it is still not working. I have tried to write another bit of code: while ('True'): if not blockType == 9 or blockType == 0: mc.setBlock(playerPosition.x, playerPosition.y -1, playerPosition.z,block.GOLD_BLOCK) mc.postToChat ('GOLD!') I added mc.postToChat ('GOLD!'). That ...
- Mon May 12, 2014 6:30 am
- Forum: Python
- Topic: Minecraft Pi Edition API
- Replies: 5
- Views: 1575
Minecraft Pi Edition API
Hi! I am a beginner when it comes to Python, I am trying to learn it using the Minecraft API. I am trying to make a program that places a GoldBlock instead of every block I step on. This is the code that I have written: import minecraft.minecraft as minecraft import minecraft.block as block import t...
- Wed Apr 23, 2014 6:40 pm
- Forum: Troubleshooting
- Topic: Minecraft Pi Edition while SSH
- Replies: 4
- Views: 1624
Re: Minecraft Pi Edition while SSH
Scratch should be fine: I often run it that way. You need to configure your ssh connection for X-forwarding. For a command-line session, try ssh -X <user@remote_address> (Of course, you need an Xserver running on the machine from which you make the ssh connection.) I believe Minecraft expects to us...
- Wed Apr 23, 2014 5:43 am
- Forum: Troubleshooting
- Topic: Minecraft Pi Edition while SSH
- Replies: 4
- Views: 1624
Re: Minecraft Pi Edition while SSH
I can´t launch Scratch either.