Go to advanced search

by halajamal
Sat Mar 16, 2019 6:01 pm
Forum: Beginners
Topic: camera-based barcode reader
Replies: 6
Views: 3527

Re: camera-based barcode reader

you could try zbar sudo apt-get install zbar-tools a bit of example code using the Pi camera, raspistill and python. import os, subprocess, sys, time if os.path.exists('out.txt'): os.remove('out.txt') rpistr = "raspistill -t 1000 -o image.jpg && zbarimg image.jpg >> out.txt" p = subprocess.Popen(rp...
by halajamal
Sat Mar 16, 2019 2:15 pm
Forum: Camera board
Topic: Raspberry Pi Camera V2 Video Module as QR Code Scanner
Replies: 1
Views: 205

Raspberry Pi Camera V2 Video Module as QR Code Scanner

Hi, I recently bought a Raspberry Pi Camera V2 Video Module. Is it possible to use it as a QR code scanner? Thanks a lot. Yes I have done this, keep resolution low to reduce processing time. hello I have to make a QR reader with raspberryPi can you help me which cam i should use and wich tutorial I...
by halajamal
Fri Mar 15, 2019 3:55 pm
Forum: Beginners
Topic: RFID can't be read
Replies: 3
Views: 287

Re: RFID can't be read

any suggestion - What reader are you using ? - How is it connected to the Pi ? - Do the code check that you actually have contact with the reader ? - What kind of tags are you using ? Where did you get them from ? - Can you check if the tags are readable on other hardware, like a Android smartphone...
by halajamal
Thu Mar 14, 2019 9:57 pm
Forum: Beginners
Topic: RFID can't be read
Replies: 3
Views: 287

RFID can't be read

hello ,I am trying ti use RFID reader to read tag
I followed this tutorial https://pimylifeup.com/raspberry-pi-rfi ... /#comments
but when i place the tag to the reader ,nothing happen , either write.py or read.py can not read or write the tag
any suggestion , help . please/??
by halajamal
Wed Mar 06, 2019 8:35 pm
Forum: Advanced users
Topic: obstacle avoidance .encoder. robot
Replies: 1
Views: 159

obstacle avoidance .encoder. robot

hello I need help I want to make a robot move a specific distance based on the reading of encoder ,every 20 tick mean one rotation. now if i make the robot go forward for 100 meter and at the point in its road there is an obstacle. the robot should move right or left based on the obstacle and then c...
by halajamal
Wed Mar 06, 2019 4:30 pm
Forum: Python
Topic: running two functions simultaneously
Replies: 16
Views: 1056

Re: running two functions simultaneously

This is a very simple thread example: from threading import Thread import time def run1(): for x in range(5): print("Run 1 %s" % x) time.sleep(1) def run2(): for x in range(5): print("Run 2 %s" % x) time.sleep(2) print("In main block") t1 = Thread(target=run1) threads = [t1] t2 = Thread(target=run2...
by halajamal
Wed Mar 06, 2019 3:15 pm
Forum: Python
Topic: running two functions simultaneously
Replies: 16
Views: 1056

Re: running two functions simultaneously

jahboater wrote:
Wed Mar 06, 2019 2:59 pm
halajamal wrote:
Wed Mar 06, 2019 2:32 pm
and another checked if the executing is right or false
This is very questionable.
While the other function is executing???
Why not just check the result in the same thread.
how's?
by halajamal
Wed Mar 06, 2019 3:12 pm
Forum: Python
Topic: running two functions simultaneously
Replies: 16
Views: 1056

Re: running two functions simultaneously

B.Goode wrote:
Wed Mar 06, 2019 2:42 pm
threading?

https://docs.python.org/3/library/threading.html
Actually i was thinking about threading but don'y know how to implement
by halajamal
Wed Mar 06, 2019 3:11 pm
Forum: Python
Topic: running two functions simultaneously
Replies: 16
Views: 1056

Re: running two functions simultaneously

It would help if you at least included some code to explain what you want to execute and what you want to test for. I am using a raspberry-pi with ultrasonic and IR sensor to detect and avoid obstacle i have a distance that the car should travel to reach target . if it have an obstacle in its road ...
by halajamal
Wed Mar 06, 2019 2:32 pm
Forum: Python
Topic: running two functions simultaneously
Replies: 16
Views: 1056

running two functions simultaneously

Hi If i wanted to run two function at same time in python what should i use? For example Function to execute what i want and another checked if the executing is right or false
by halajamal
Mon Feb 25, 2019 6:02 pm
Forum: Troubleshooting
Topic: ultrasonic not working
Replies: 1
Views: 118

ultrasonic not working

hello dears . I need help please I have a problem with raspberry pi 3b and ultrasonic sensor I wanted to sense and indicate the obstacle I connect it as many tutorial on google and measure it before a while and it wwas work today i came and excute same code with same connection it didn't need to mea...
by halajamal
Mon Jan 28, 2019 4:19 pm
Forum: General discussion
Topic: what is the best choice for obstacle avoidance
Replies: 2
Views: 249

what is the best choice for obstacle avoidance

hello I am wondering for which is best sensor used for detect and avoid obstacle IR sensor or ultrasoniic sensor ?? can anyone recommend me ? is there anyone who used that before , note: I use raspberry Pi and the path that the robot move on is based on no of rotation of wheels so which is the best...
by halajamal
Sat Jan 26, 2019 6:16 pm
Forum: Python
Topic: encoder with python
Replies: 1
Views: 279

encoder with python

hello I have a robot car with 2 dc motor a dc encoder that connect to RPi3b and dc motor I want to make a robot move according to number of rotation that measure by encoder . so that robot move and encoder start to measure when it reach 5 rotation, robot will stop, Now my problem is I can't turn rig...
by halajamal
Tue Jan 22, 2019 9:49 am
Forum: Automation, sensing and robotics
Topic: Robot Questions
Replies: 8
Views: 626

Re: Robot Questions

also i was thinking that the sensors would be like this --| |---| (the lines are sensors, - this line is only for spacing (spaces just dissapear)) if the front sensor doesnt see black, and the right one does, it turns 90 degrees, (if the front sensor senses white, it stops, then goes very slowly un...
by halajamal
Sun Dec 02, 2018 4:02 pm
Forum: Beginners
Topic: client server
Replies: 1
Views: 184

client server

hello
how i can create a cient server model between two pi
by halajamal
Wed Nov 14, 2018 8:54 am
Forum: Python
Topic: creating web site that control Rpi3
Replies: 1
Views: 265

Re: creating web site that control Rpi3

Please help me
by halajamal
Tue Nov 13, 2018 12:19 pm
Forum: Python
Topic: creating web site that control Rpi3
Replies: 1
Views: 265

creating web site that control Rpi3

hello what I have : I have RPi3 and i want to control movement of robot that have 2 dc motor connected to driver L298n what i want: so i want that website or webapp to have a button, when pressing this button the robot move (the motors run) what i did : this the code that i create with python and fl...
by halajamal
Tue Oct 09, 2018 4:44 pm
Forum: Beginners
Topic: error of creating file
Replies: 7
Views: 531

Re: error of creating file

DirkS wrote:
halajamal wrote:
Mon Oct 08, 2018 9:17 pm
i also cant access any file not only to edit it
Sorry, but what exactly do you mean?
Can't you even read files without 'sudo'?

yes / exactly
I can read any file using sudo
by halajamal
Mon Oct 08, 2018 9:17 pm
Forum: Beginners
Topic: error of creating file
Replies: 7
Views: 531

Re: error of creating file

DirkS wrote:
Sat Oct 06, 2018 1:14 pm
That seems to be essentially the same as on my system.

What OS + version do you run on? Raspbian Stretch or Jessie?

BTW: generally you would not use 'sudo' to edit a file for a normal user (like pi)
i used raspian
i also cant access any file not only to edit it
by halajamal
Sat Oct 06, 2018 12:54 pm
Forum: Beginners
Topic: error of creating file
Replies: 7
Views: 531

Re: error of creating file

What is the output of file -L /lib/arm-linux-gnueabihf/libncursesw.so.5 [email protected]:~ $ file -L /lib/arm-linux-gnueabihf/libncursesw.so.5 /lib/arm-linux-gnueabihf/libncursesw.so.5: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), statically linked, BuildID[sha1]=b9b104051666793e4849365...
by halajamal
Sat Oct 06, 2018 11:55 am
Forum: Beginners
Topic: error of creating file
Replies: 7
Views: 531

error of creating file

hello all
when i try the commannd sudo nano file name
it display an error
the err is
[email protected]:~ $ sudo nano lo.py
nano: error while loading shared libraries: /lib/arm-linux-gnueabihf/libncursesw.so.5: ELF file ABI version invalid
where is the problem? how to fix it
by halajamal
Thu Oct 04, 2018 8:54 pm
Forum: Beginners
Topic: Ultrasonic sensor
Replies: 16
Views: 1026

Re: Ultrasonic sensor

If you have changed the code then you need to post the code you are using on your pi now so we can see your code. please use code tags to post your code them we can copy it from the post for testing/correction. Add [ code] at the top code goes here and [/code] at the bottom. when you post your code...
by halajamal
Thu Oct 04, 2018 8:53 pm
Forum: Beginners
Topic: Ultrasonic sensor
Replies: 16
Views: 1026

Re: Ultrasonic sensor

If you have changed the code then you need to post the code you are using on your pi now so we can see your code. please use code tags to post your code them we can copy it from the post for testing/correction. Add [ code] at the top code goes here and [/code] at the bottom. when you post your code...
by halajamal
Thu Oct 04, 2018 8:52 pm
Forum: Beginners
Topic: Ultrasonic sensor
Replies: 16
Views: 1026

Re: Ultrasonic sensor

The space/taps are not good in you program, try this one: #!/usr/bin/python import time import RPi.GPIO as GPIO from time import sleep GPIO.setmode(GPIO.BOARD) GPIO_TRIGGER = 11 GPIO_ECHO = 13 Motor1A = 16 Motor1B = 18 Motor1E = 22 Motor2A = 19 Motor2B = 21 Motor2E = 23 GPIO.setup(Motor1A,GPIO.OUT)...
by halajamal
Wed Oct 03, 2018 9:33 pm
Forum: Beginners
Topic: Ultrasonic sensor
Replies: 16
Views: 1026

Re: Ultrasonic sensor

Put simply, the indentation of the python statements in the script you have linked to is completely incorrect. 'Cut and paste' of this code is never going to give you a working result. You could go through the script, understand what it is intended to do, and correct the indentation appropriately. ...

Go to advanced search