The code changes include adding a new Arduino sketch for position tracking. The sketch is located at `code/arduino/Position-tracking/Position-tracking.ino`. Additionally, a new class `PositionSensor` is added with its corresponding header and implementation files. This class handles the position sensor functionality and includes methods for initialization and measurement. The commit message suggests that the changes are a new feature addition related to position tracking in the Arduino code.
13 lines
258 B
C++
13 lines
258 B
C++
#include "PositionSensor.h"
|
|
|
|
PositionSensor::PositionSensor(int pin) : _pin(pin) {}
|
|
|
|
void PositionSensor::begin() {
|
|
Serial.begin(115200);
|
|
pinMode(_pin, INPUT);
|
|
}
|
|
|
|
void PositionSensor::Measure() {
|
|
int value = analogRead(_pin);
|
|
Serial.println(value);
|
|
} |