Files
hexapod-robot/2026-current/sim/shim/Wire.h
T

18 lines
545 B
C++
Raw Normal View History

#pragma once
#include <Arduino.h>
// Stand-in for the I2C bus with one simulated MPU6050 on it (address 0x68).
// The simulation fills its accel/gyro registers from the simulated body
// motion, so robot/RobotIMU.cpp runs unchanged, register map and all.
class TwoWire {
public:
void begin() {}
void setClock(uint32_t) {}
void beginTransmission(int address);
size_t write(uint8_t b);
uint8_t endTransmission(bool stop = true);
uint8_t requestFrom(int address, int quantity);
int available();
int read();
};
extern TwoWire Wire;