MCPcopy Create free account
hub / github.com/DexterInd/GoPiGo3 / set_servo

Method set_servo

Software/C/GoPiGo3.cpp:233–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231}
232
233int GoPiGo3::set_servo(uint8_t servo, uint16_t us){
234 spi_array_out[0] = Address;
235 spi_array_out[1] = GPGSPI_MESSAGE_SET_SERVO;
236 spi_array_out[2] = servo;
237 spi_array_out[3] = ((us >> 8) & 0xFF);
238 spi_array_out[4] = (us & 0xFF);
239 return spi_transfer_array(5, spi_array_out, spi_array_in);
240}
241
242int GoPiGo3::set_motor_power(uint8_t port, int8_t power){
243 spi_array_out[0] = Address;

Callers

nothing calls this directly

Calls 1

spi_transfer_arrayFunction · 0.85

Tested by

no test coverage detected