Andres SabasEduardo Contreras
Published © CC BY-NC

Como iniciar con Walabot en Raspberry Pi

Tutorial en español de como iniciar con Walabot en Raspberry Pi

IntermediateFull instructions provided2 hours87
Como iniciar con Walabot en Raspberry Pi

Things used in this project

Story

Read more

Schematics

Conexión

Code

Script Hello Walabot

Python
from __future__ import print_function
from sys import platform
from os import system
from imp import load_source
from os.path import join
modulePath = join('/usr', 'share', 'walabot', 'python', 'WalabotAPI.py')     
wlbt = load_source('WalabotAPI', modulePath)
wlbt.Init()


wlbt.Init()  # load the WalabotSDK to the Python wrapper
wlbt.SetSettingsFolder()  # set the path to the essetial database files
wlbt.ConnectAny()  # establishes communication with the Walabot

wlbt.SetProfile(wlbt.PROF_SENSOR)  # set scan profile out of the possibilities
wlbt.SetDynamicImageFilter(wlbt.FILTER_TYPE_MTI)  # specify filter to use

wlbt.Start()  # starts Walabot in preparation for scanning

while True:
    wlbt.Trigger()  # initiates a scan and records signals
    targets = wlbt.GetSensorTargets()  # provides a list of identified targets
    system('cls' if platform == 'win32' else 'clear')  # clear the terminal
    for i, t in enumerate(targets):
        print('Target #{}\nx = {}\ny = {}\nz = {}\n'.format(
            i+1, t.xPosCm, t.yPosCm, t.zPosCm))

wlbt.Stop()  # stops Walabot when finished scanning
wlbt.Disconnect()  # stops communication with Walabo

Credits

Andres Sabas

Andres Sabas

40 projects • 44 followers
Co-Founder of The Inventor's House Hackerspace, DIY, Workaholic
Eduardo Contreras

Eduardo Contreras

8 projects • 20 followers
Electronics Enginner, mexican maker

Comments