element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
RoadTests & Reviews
  • Products
  • More
RoadTests & Reviews
Blog Omron HVC-P2 Roadtest - Python Code running on RPi3
  • Blog
  • RoadTest Forum
  • Documents
  • RoadTests
  • Reviews
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join RoadTests & Reviews to participate - click to join for free!
  • Share
  • More
  • Cancel
  • Author Author: ralphjy
  • Date Created: 15 Sep 2018 10:30 PM Date Created
  • Views 290 views
  • Likes 3 likes
  • Comments 2 comments
Related
Recommended

Omron HVC-P2 Roadtest - Python Code running on RPi3

ralphjy
ralphjy
15 Sep 2018

I'm still working on the procedure that I want to use to test the performance of the HVC-P2.  While I was pondering, I thought I'd try hooking the unit up to a Linux laptop.  Of course that was a disaster.  I stepped into the 32bit/64bit hole again.  The laptop I'm using is running the 64bit version of the Ubuntu 16.04 OS.  I configured all the software but immediately upon executing the python script I got the evil ELFCLASS32 error.  The libSTB.so library of stabilization code was compiled as 32bit so it complained when I tried to link to it with the 64bit OS.  I'll have to see if I can find the source code so that I can recompile this library, but in the meantime I decided to move on to the RPi.  I am eventually going to use the HVC-P2 with an RPi0W, but I have a headless RPi3 already configured so I decided to use that for now.

 

Here's my setup - just power and the HVC-P2 connected to the RPi3.

image

 

First step was to verify I'm using Python 2.7.  Then install the pyserial library for communication and the Pillow library for image processing.

image

 

Then to verify that the HVC-P2 was recognized by the OS.  It shows up as ttyACM0 in /dev.

image

 

Then copy the python code and execute:

 

    Usage: execution.py <com_port> <baudrate> [use_stb=ON]

        com_port:  COM port

        baudrate: baudrate

        use_stb:   Using flag for STB Library (optional)

 

    python execution.py /dev/ttyACM0 921600 ON

image

 

So moving to the RPi was painless.  The STB library was written and tested with Raspbian Jessie, but it doesn't appear to have any issues with Stretch (using Release 9.4).

 

Now to start writing some code....

  • Sign in to reply
  • ralphjy
    ralphjy over 6 years ago in reply to balearicdynamics

    Are you running on the RPi or using Windows?  Is your hand detection working?  That's the one mode that is consistently intermittent for me.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • balearicdynamics
    balearicdynamics over 6 years ago

    Well done job! Me too I am playing with this interesting device and it has a lot of possibilities.

     

    Enrico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube