Go to advanced search

by OutoftheBOTS
Tue Sep 11, 2018 7:31 pm
Forum: Python
Topic: Quadrature encoder serial pins question
Replies: 11
Views: 596

Re: Quadrature encoder serial pins question

The code that was linked isn't complete and is just Python Pseudo Code not complete python code. Reading quadrature encoders in python on RPi isn't very efficient to do because the fact that python on RPi isn't real time and has a lot of latency. The very easiest way to do it is with an external qua...
by OutoftheBOTS
Fri Sep 07, 2018 9:31 pm
Forum: Automation, sensing and robotics
Topic: Zigbee home automation on Pi Zero W
Replies: 5
Views: 8479

Re: Zigbee home automation on Pi Zero W

Now I am not sure about this but someone might correct me on this but the RPi should be capable of doing zigbee without any extra hardware as it already has a 2.4GHz radio. WiFi, Bluetooth and Zigbee all use 2.4GHz radio but are just different protocols (i.e just different software). I did a quick g...
by OutoftheBOTS
Fri Sep 07, 2018 10:26 am
Forum: Automation, sensing and robotics
Topic: Using RF Beacon System for an Follower Robot
Replies: 4
Views: 626

Re: Using RF Beacon System for an Follower Robot

many people have done this using an IR beacon. You put a IR LED flashing at a certain freq (38KHz is most common) on the object that you want to track. Then you have a senor on the robot that tracks the flashing IR light see https://www.youtube.com/watch?v=3rHuFFe6HRc if you look on YouTube there wi...
by OutoftheBOTS
Fri Sep 07, 2018 10:10 am
Forum: Automation, sensing and robotics
Topic: Project advice on using analog accelerometers with an ADC
Replies: 5
Views: 900

Re: Project advice on using analog accelerometers with an ADC

Your only ever as fast as your slowest bottle neck. Most of these devices you have posted can be communicated by either I2C or SPI. Depending upon freq used SPI is usually 1000s of times faster than I2C. My bet will be on the MPU9260 on being the fastest and most accurate. It is very much the curren...
by OutoftheBOTS
Thu Sep 06, 2018 8:22 am
Forum: Python
Topic: Trying to make python import work
Replies: 9
Views: 708

Re: Trying to make python import work

I think maybe you need to learn better set out of your programs. Your main program should have the main variables within it then each class/object or function should have the variables that they need within it then any resources/data that needs to be shared can be passed/returned The whole point of ...
by OutoftheBOTS
Wed Sep 05, 2018 9:35 pm
Forum: Python
Topic: Trying to make python import work
Replies: 9
Views: 708

Re: Trying to make python import work

In python you can pass hardware instances to function or objects. i.e I can create and instance of I2C and pass that instance to functions or objects. This is really handy because I could have a class/object for driving an I2C sensor then another class/object for driving a different I2C device. I ca...
by OutoftheBOTS
Wed Sep 05, 2018 5:32 am
Forum: Python
Topic: Trying to make python import work
Replies: 9
Views: 708

Re: Trying to make python import work

You just need to understand how the global/local variables works. The whole story is a little complicated. A variable declared (first used) in main loop can be read from a function internal to that main loop but if you try to write to that variable it will create a new local 1 with the same name unl...
by OutoftheBOTS
Fri Aug 31, 2018 8:58 pm
Forum: Automation, sensing and robotics
Topic: Irrigation design
Replies: 10
Views: 844

Re: Irrigation design

Yes if needing lots of relay in 1 place then single relay board might be a bit of a pain. There is also some boards out there with 4 relays here's a ESP8266 with 4 https://www.aliexpress.com/item/ESP8266-12V-4Channel-WiFi-Relay-module-Smart-Home-Phone-APP-Remote-Control-Switch/32878566470.html?ws_ab...
by OutoftheBOTS
Fri Aug 31, 2018 9:25 am
Forum: Automation, sensing and robotics
Topic: Irrigation design
Replies: 10
Views: 844

Re: Irrigation design

You guys might be interested in something like these https://www.aliexpress.com/item/WIFI-Relay-Module-ESP8266-IOT-APP-Controller-2-Channel-For-Smart-Home-12V-G25-Great-Value/32862098154.html?ws_ab_test=searchweb0_0,searchweb201602_4_10065_10068_5910015_10130_5723115_10547_5723715_5890015_10548_5723...
by OutoftheBOTS
Sat Aug 25, 2018 9:22 pm
Forum: Python
Topic: Recording while button is pressed.
Replies: 3
Views: 609

Re: Recording while button is pressed.

Yes a small sleep before testing for next edge will allow for button bounce to finsh before testing again something like this #!/usr/bin/env python import RPi.GPIO as GPIO import subprocess, time GPIO.setmode(GPIO.BCM) # Leds 6 22 # buttons 4 27 recbutton=27 recled=22 GPIO.setup(recbutton, GPIO.IN, ...
by OutoftheBOTS
Sat Aug 25, 2018 2:06 am
Forum: Python
Topic: Convert video to bit stream
Replies: 21
Views: 1326

Re: Convert video to bit stream

You can also buy off the shelf cheap UART to serial IR links that convert your Uart serial into flashing IR LED. I have never used 1 but have seen them see https://www.ebay.com/p/5v-IR-Infrared-Remote-Decoder-Encoding-Transmitter-receiver-Wireless-Module/883063019?iid=381593359339&_trkparms=aid%3D2...
by OutoftheBOTS
Fri Aug 24, 2018 9:08 pm
Forum: Python
Topic: Convert video to bit stream
Replies: 21
Views: 1326

Re: Convert video to bit stream

You could also look at how an IR remote works as this is exactly what it does : send data (stream of bits) via an IR LED to an IR photo-diode at the receiver. IR remote are a little more complex as the use a 38khz flashing IR LED to send the signal and the receiver and the reciver rejects reading an...
by OutoftheBOTS
Fri Aug 24, 2018 8:47 pm
Forum: Python
Topic: Convert video to bit stream
Replies: 21
Views: 1326

Re: Convert video to bit stream

I assume this your using an LED and photo-resistor because it is for a school project or interest project to simulate something like how optic fiber works. To simply send a file as a styream of bits os quite easy. 1. open the file as a read binary file 2. read 1 byte at a time 3. peel off 1 bit at a...
by OutoftheBOTS
Sun Aug 19, 2018 9:16 pm
Forum: Python
Topic: Using shift registers for 7 segments led displays
Replies: 3
Views: 297

Re: Using shift registers for 7 segments led displays

OK you have a 2 digit decimal number and you need to turn it in to 2 x 1 digit numbers. You do this by conveting it to a string the cutting up the string and then turning it back to an integer. You should be able to do the same thing by the first digit will be integer division by 10 and the second d...
by OutoftheBOTS
Sat Aug 18, 2018 11:26 pm
Forum: Python
Topic: Using shift registers for 7 segments led displays
Replies: 3
Views: 297

Re: Using shift registers for 7 segments led displays

OK I have only once before had to program a shift register (hacking a NESS controller) So these r your pins DATAIN = 37 # serin LATCH = 33 # RCK CLOCK = 31 # SRCK CLEAR = 35 # SRCLR OE = 11 # Output Enable Low OE needs to be low because even though it is called enable it works like a disable :( LATC...
by OutoftheBOTS
Thu Aug 16, 2018 8:12 am
Forum: Automation, sensing and robotics
Topic: What motion sensors suitable for drones, work with a Pi ?
Replies: 4
Views: 445

Re: What motion sensors suitable for drones, work with a Pi ?

When you say motion sensor you mean IMU. Most people will use a MPU9250 and it can be connected either via I2C or SPI. But do realize it is a complex matter to get absolute orientation from them.
by OutoftheBOTS
Thu Aug 16, 2018 8:01 am
Forum: Automation, sensing and robotics
Topic: Motor/Driver Recommendation for balancing robot
Replies: 2
Views: 334

Re: Motor/Driver Recommendation for balancing robot

The yellow motors are nice motors for basic driving around a simple robot were you don't need a lot of sudden torque. You will likely need a motor with a bit more power for sudden acceleration for balancing. 99% of DC motors will turn faster in 1 direction than the other. It has to do with how they ...
by OutoftheBOTS
Thu Aug 16, 2018 7:52 am
Forum: Python
Topic: Controlling my Mindstorms ev3 via Python from Raspberry Pi
Replies: 3
Views: 1038

Re: Controlling my Mindstorms ev3 via Python from Raspberry Pi

It really depends upon what your want to do. EV3DEV is a linux OS that you put on an SD card and stick into the EV3 and it boots up on it and you can program it then in many different languages but most people use python as it tends to have the most advanced developed libraries fro EV3. This will al...
by OutoftheBOTS
Tue Aug 07, 2018 10:13 pm
Forum: Python
Topic: neopixel led matrix
Replies: 9
Views: 1991

Re: neopixel led matrix

everything works, tkanks, all LEDs are lit even at maximum brightness :D Do you have an interesting example from python to learn how to use api? https://learn.adafruit.com/neopixels-on-raspberry-pi/software Because here shows how to use the straps and not the matrix I would be very causoius about u...
by OutoftheBOTS
Mon Aug 06, 2018 10:04 pm
Forum: Python
Topic: neopixel led matrix
Replies: 9
Views: 1991

Re: neopixel led matrix

By the look at it you have connected the power to 1 end and the data to the other end. You will need to make sure that you have connected both to the input end of the neopixel matrix. Each neo pixel has a data in pin and data out pin to chain them together. You need to connect your RPi data out pin ...
by OutoftheBOTS
Thu Aug 02, 2018 9:20 pm
Forum: Automation, sensing and robotics
Topic: Battery powered Pi car is having power issues.
Replies: 13
Views: 967

Re: Battery powered Pi car is having power issues.

Yes, C rating matters, however if OP gets a 5Ah cell or higher, the C rating will not matter (a 1C 5Ah battery is capable of 5A - wiring and boost module permitting) Usually in engineering you would identify the problem then look for a solution to the underlying problem. The OP didn't have a proble...
by OutoftheBOTS
Thu Aug 02, 2018 5:43 am
Forum: Automation, sensing and robotics
Topic: Battery powered Pi car is having power issues.
Replies: 13
Views: 967

Re: Battery powered Pi car is having power issues.

I would definitely recommend a large LiPo cell, somewhere around 5 or 6 thousand mA should fit in the battery cavity. I use Lipo batteries for all my motor projects. What matters is that it can supply the needed amps so you must use the correct battary to get the correct amps. Lipo batteries design...
by OutoftheBOTS
Tue Jul 31, 2018 10:15 pm
Forum: Automation, sensing and robotics
Topic: Questions considering l239D IC
Replies: 2
Views: 300

Re: Questions considering l239D IC

To drive a stepper motor it is easier to use a driver that is designed for stepper motors so that you don't have to create the stepping pattern but rather operate a direction pin and a step pin, these drivers also quite often have micro stepping to get smoother operation and also these drivers are u...
by OutoftheBOTS
Tue Jul 31, 2018 3:18 am
Forum: Automation, sensing and robotics
Topic: Colour Tracking Robot
Replies: 5
Views: 418

Re: Colour Tracking Robot

Ok I will see if I can help you a little. ret, frame = cap.read() _, frame = cap.read() first why do you capture the image twice?? hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV) here you conveter from RGB to HSV colour space. This is a good thing as colour detection is easier in HSV colour space. I th...
by OutoftheBOTS
Sat Jul 28, 2018 8:10 am
Forum: Python
Topic: neopixel led matrix
Replies: 9
Views: 1991

Re: neopixel led matrix

so just use 3 standard AA batteries or 4 rechargeable AAs. In the specs of these LED matrix it says they can use up to 15amps, my understanding is that AA batteries struggle to supply anything more than 1 Amp. AA batteries would be a great solution for a small number of LEDs but I would be interest...

Go to advanced search