Search Results

by johnsayeau
Tue Aug 15, 2023 12:37 pm
Forum: General
Topic: power plug (digital output) not turning off
Replies: 1
Views: 24150

power plug (digital output) not turning off

Hello, I have a simple script that I am trying to use to power a device on and off again. I am using a vint hub0001_0 and a psu 1000_0 plug I am sure this used to work but now it supplies power to the device when I do “p.setDutyCycle(1)” or “p.setState(True)” but when I set the duty cycle to 0 or th...
by johnsayeau
Mon Apr 29, 2019 2:05 pm
Forum: Python
Topic: Trying to control linear actuator - won't move unless it's in a while loop
Replies: 4
Views: 11088

Re: Trying to control linear actuator - won't move unless it's in a while loop

mparadis not sure I understand what adding the 2 second sleep does but it works. the position reached handler doesn't work like I thought it would. it gets triggered almost as soon as the motor starts moving even though the motor may move for several seconds after that. Also when I add the 2 second ...
by johnsayeau
Sun Apr 28, 2019 11:45 am
Forum: Python
Topic: Trying to control linear actuator - won't move unless it's in a while loop
Replies: 4
Views: 11088

Trying to control linear actuator - won't move unless it's in a while loop

I've beee trying to get a linear actuator to rach out and poke something and then go back. I can only get it to move if I put the setTargetPosition and setEngaged in a while loop but then I can't break out of the while loop using the on target position reached handler. Here's my code: import sys imp...