Go to advanced search

by neteng
Wed Oct 12, 2016 2:17 am
Forum: Beginners
Topic: Moving a Motor
Replies: 2
Views: 564

Moving a Motor

Below is a code that moves my motor through connection to the arduino. My arduino is serially connected to the pi for which transmission of data is handled through the nanpy software....my motor drivers are connected to my arduino... from nanpy import (ArduinoApi, SerialManager) from time import sle...
by neteng
Tue Oct 11, 2016 12:43 am
Forum: General discussion
Topic: Rotary Encoder Script putting it as a function
Replies: 3
Views: 774

Re: Rotary Encoder Script putting it as a function

That looks odd for rotary encoder code. I assume one of the phases is arbitrarily chosen as a clock. I suggest you convert it to a class. Here is an example of the sort of thing you could do http://abyz.co.uk/rpi/pigpio/examples.html#Python_rotary_encoder_py Thanks...Will try that out.... neteng
by neteng
Mon Oct 10, 2016 11:28 am
Forum: General discussion
Topic: Rotary Encoder Script putting it as a function
Replies: 3
Views: 774

Rotary Encoder Script putting it as a function

Hi All, I have this script that is for a rotary encoder and is as such: from RPi import GPIO from time import sleep clk = 17 dt = 18 #lm1 = 4 GPIO.setmode(GPIO.BCM) GPIO.setup(clk, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) GPIO.setup(dt, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) #GPIO.setup(lm1, GPIO.IN, pull...
by neteng
Mon Oct 10, 2016 10:57 am
Forum: General discussion
Topic: Rotary Encoder
Replies: 7
Views: 1800

Re: Rotary Encoder

Hi again everyone, Thanks for the reply... Finally able to get my optical encoders working.The limiting resistors on the GPIO input were the problem...I think they had provided a far greater potential drop, making the pi unable to read the inputs.....the gpio input limiting resistors were 1.1K....Ma...
by neteng
Mon Oct 10, 2016 2:21 am
Forum: General discussion
Topic: Rotary Encoder
Replies: 7
Views: 1800

Rotary Encoder

Hi All, Below is a code for a rotary encoder: from RPi import GPIO from time import sleep clk = 17 dt = 18 GPIO.setmode(GPIO.BCM) GPIO.setup(clk, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) GPIO.setup(dt, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) counter = 0 clkLastState = GPIO.input(clk) try: while True: clkSt...
by neteng
Mon Oct 03, 2016 11:56 pm
Forum: Beginners
Topic: Robotic arm
Replies: 2
Views: 443

Re: Robotic arm

Running two programs at the same time is probably not the best solution. You need to integrate the two programs together so that they both work by only running one program. With python (and almost every other language) you can import/include functions and features from other source code files to co...
by neteng
Mon Oct 03, 2016 11:25 am
Forum: Beginners
Topic: Robotic arm
Replies: 2
Views: 443

Robotic arm

I have two python files. One is for moving a dc motor(for my arm) and the other is for reading its encoder.

How can I run it such that i will be able to run the motor whilst reading the encoder counts...........????

Thanks,
neteng
by neteng
Thu Sep 29, 2016 8:50 am
Forum: Beginners
Topic: Python 3 Coding Issue_Print Command
Replies: 5
Views: 688

Re: Python 3 Coding Issue_Print Command

It looks like you've got some weir quotation marks on that line print(¨Failed to connect to arduino¨) it should look like this print("Failed to connect to arduino") It is probably a result of a copy/paste from a web page with some bad formatting. Hi rpdom.... No, i typed it in myself. When I hit th...
by neteng
Wed Sep 28, 2016 11:04 pm
Forum: Beginners
Topic: Python 3 Coding Issue_Print Command
Replies: 5
Views: 688

Python 3 Coding Issue_Print Command

Hi, my print command doesn't seem to work....I am using the nanpy-firmware to establish master-slave protocol with my arduino....when I apply hashtags to all the print commands, the program executes......when i don't it pops up a syntax error the error is: File"buttonLED.py", line 13 print("Failed t...
by neteng
Wed Sep 28, 2016 10:10 am
Forum: General discussion
Topic: PID controller for DC Motor Positioning
Replies: 1
Views: 1731

PID controller for DC Motor Positioning

Hi all,

Could anyone help me as to how one can implement a PID controller on python??....having trouble calling a variable which is in another python script.....??....the variable is the input to my PID controller.......

Thanks...
by neteng
Wed Sep 28, 2016 2:59 am
Forum: Automation, sensing and robotics
Topic: Scorbot ER III Limit Switches
Replies: 1
Views: 386

Scorbot ER III Limit Switches

I am trying to read the limit switches of a SCORBOT robotic arm....How do I connect it such that the pi reads one when it is pressed????

I know that 3v3 must be supplied...I am having trouble understand do i connect it to ground or any gpio pin????
by neteng
Tue Sep 27, 2016 1:35 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: GPIO current specifications
Replies: 19
Views: 17445

Re: GPIO current specifications

I am trying to read the output channels of an optical encoder.....I have already reading one, having its vcc supplied by the RPi's own 3V3 rail...........It works fine....However, i still have to read 5 more encoders (2 channels per encoder) and 5 limits switches. Note that I want to supply my encod...
by neteng
Mon Sep 26, 2016 2:07 am
Forum: Automation, sensing and robotics
Topic: Optical Encoder
Replies: 5
Views: 1680

Re: Optical Encoder

I am thinking of using an ATX power supply to cater for my 3.3V Vcc for my encoder. Is this harmful to my GPIO???
by neteng
Sun Sep 25, 2016 11:32 pm
Forum: Automation, sensing and robotics
Topic: Yet Another Rotary Encoder Solution (Python)
Replies: 8
Views: 11849

Re: Yet Another Rotary Encoder Solution (Python)

So what you are saying paulv, I should externally pull up my encoder output with 1k resistors???......
by neteng
Mon Sep 19, 2016 8:30 am
Forum: Automation, sensing and robotics
Topic: Optical Encoder
Replies: 5
Views: 1680

Re: Optical Encoder

Thanks joan...

What is this 4k7 you're talking about??
by neteng
Mon Sep 19, 2016 6:38 am
Forum: Automation, sensing and robotics
Topic: Yet Another Rotary Encoder Solution (Python)
Replies: 8
Views: 11849

Re: Yet Another Rotary Encoder Solution (Python)

Hi paulv,

You mention in the codes that the pullups are weak??...What does this mean???...Does it mean that I will get unstable count values if I use the pull up feature???

Thanks,
neteng
by neteng
Mon Sep 19, 2016 12:26 am
Forum: Automation, sensing and robotics
Topic: Optical Encoder
Replies: 5
Views: 1680

Optical Encoder

Hi All, I am still a RPi newbie and I am in search(if their is one) of a motor encoder library. My motors are 12V DC motors with optical encoders providing feedback. These encoders have 2 channel output, channel A and B which are 90 degrees apart. Could anyone provide a source code library or hints ...
by neteng
Sun Sep 18, 2016 10:11 pm
Forum: Automation, sensing and robotics
Topic: Ultimate rotary encoder switch decoder
Replies: 18
Views: 24168

Re: Ultimate rotary encoder switch decoder

Hi hrvoje,

Will this code work on a motor encoder???
by neteng
Mon Sep 12, 2016 5:48 pm
Forum: General discussion
Topic: Touchscreen Troubleshooting
Replies: 1
Views: 305

Touchscreen Troubleshooting

Hi, I recently acquired a raspberry pi touchscreen. However, I might have connected the wrong leads i.e the 5V GPIO rail went to the ground on the adapter board and the GND rail went onto the 5V on the adapter board. Now the screen is no longer working. However, even at the first time connecting it,...
by neteng
Sun Aug 14, 2016 12:02 pm
Forum: Beginners
Topic: Using Raspberry Pi with Arduino_ Communication
Replies: 3
Views: 649

Re: Using Raspberry Pi with Arduino_ Communication

Hi SIDF92, Thanks for the tips.....Just note that the only connection between Arduino and RPi is through the serial USB cable...No connection between them will be directly with each other(each others GPIO)......The signals from my shaft encoder and limit switches will be connected to the Pi's GPIO.....
by neteng
Wed Jul 27, 2016 2:45 am
Forum: Beginners
Topic: Using Raspberry Pi with Arduino_ Communication
Replies: 3
Views: 649

Using Raspberry Pi with Arduino_ Communication

Hi all, I have a project of developing a control box for a discarded robotic arm. My design intends to use the Raspberry Pi to process the controller algorithms send the the appropriate signals over to the ARduino to initalize PWM modulation to be sent to the various motor controllers. Currently con...
by neteng
Sat Jul 23, 2016 5:26 am
Forum: Beginners
Topic: Raspberry Pi with Arduino
Replies: 7
Views: 1776

Re: Raspberry Pi with Arduino

The optical encoder for our motors have a 5VDC Vcc and a 2 channels output.......I want the ouputs to be fed to the Raspberry Pi's GPIO. However, the Pi's GPIO are 3.3V TTL......Is it still possible to still integrate the encoder as such???......By providing a sort of intermediate level converter be...
by neteng
Thu May 12, 2016 12:36 am
Forum: Beginners
Topic: Raspberry Pi with Arduino
Replies: 7
Views: 1776

Re: Raspberry Pi with Arduino

Your choice of an Arduino to interface directly with the servos may be correct, but note that while it is true to say that the RPi has only one hardware-controlled pwm pin you should be aware that any/all of the gpio pins on the RPi can be used to generate pwm signals under software control. A libr...
by neteng
Wed May 11, 2016 4:43 am
Forum: Beginners
Topic: Raspberry Pi with Arduino
Replies: 7
Views: 1776

Raspberry Pi with Arduino

Hi all, I have a robotic arm project. The arm has 6 motors, of which the 6th is the gripper motor. Since the Pi only has one pwm pin, I want to use an Arduino board to generate the respective pwm signals needed for the motors. I want my algorithm(inverse Kinematics and forward kinematics) to be comp...

Go to advanced search