#include "test.h" int test() { BrickPi3 BP; BP.detect(); // Make sure that the BrickPi3 is communicating and that the firmware is compatible with the drivers. char str[33]; // Room for the 32-character serial number string plus the NULL terminator. BP.get_manufacturer(str); printf("Manufacturer : %s\n", str); BP.get_board(str); printf("Board : %s\n", str); BP.get_id(str); printf("Serial Number : %s\n", str); BP.get_version_hardware(str); printf("Hardware version: %s\n", str); BP.get_version_firmware(str); printf("Firmware version: %s\n", str); printf("Battery voltage : %.3f\n", BP.get_voltage_battery()); printf("9v voltage : %.3f\n", BP.get_voltage_9v()); printf("5v voltage : %.3f\n", BP.get_voltage_5v()); printf("3.3v voltage : %.3f\n", BP.get_voltage_3v3()); }