Very simple tracking algorithm - Raspberry Pi Forums


apologies in advance, rubbish @ programming , think i'm being bit thick here, i'm appealing forum inspiration.

have fixed array of 8 pir sensors arranged around compass points, , turret various things on rotated stepper motor. turret should follow people walk past.

@ moment, have simple series of 8 'if' statements, i.e. if north-east pir active, goto 90 degrees. kindof works , has advantage heads latest pir go active, it's not clever, , precise 45 degrees. ideally able find average position based on multiple sensor inputs, dumb programmings techniques involve exponentially large series of 'if' statements.

briefly tried using callbacks functions, 1 each sensor, think ended 8 different threads fighting each other.

can me 'proper' way of doing this?

post current code , we'll see if/how can improved.


raspberrypi



Comments

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support