Running the code results in the very spartan: OpenHTF outputs minimal information by default. import openhtf as 4 Digital Measurement") This code does not interact with hardware, yet, but demonstrates several important OpenHTF concepts. The snippet below defines a measurement 'P4_digital', assigns a docstring of "Pin 4 Digital Measurement", and sets the passing value for the measurement to "True". OpenHTF BasicsĪ barebones OpenHTF program can be written in a quick 10 lines. The Arduino IDE ships with a default Firmata example and plenty of firmata implementations for Python (and many other languages) are available. Firmata abstracts away the need to write a serial protocol communicating pin state between the MCU and the host PC. To speed up development, Firmata will be used as the communication layer between the MCUs and OpenHTF. One of the fastest way to get up to speed with OpenHTF is to use it as a test suite for automating an Arduino or a Teensy. Despite the lacking documentation, the core features of OpenHTF work well. At the time of writing, the best way to learn the framework is to read the source code (which has several TODOs). However, OpenHTF does not embrace a " batteries included" philosophy and the documentation is minimal - there are a handful of examples but no real tutorial or coherent API guide. OpenHTF is not that different from other task runners, but has some handy abstractions for interacting with hardware and taking physical measurements. OpenHTF ("Open-Source Hardware Testing Framework") is a Python test framework open-sourced by Google at the 2016 Google Test Automation Conference with a big bold disclaimer: " This is not an official Google product", so hopefully OpenHTF cannot be discontinued.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |