Browse Source

Added missing commands for measurements.

master
nickg 5 years ago
parent
commit
9993027021
  1. 6
      Code/miniRobotRC/JoystickSteuerung.ino
  2. 2
      Code/miniRobotRC/_main.ino
  3. 4
      Code/miniRobotRC/miniRobotRC.ino

6
Code/miniRobotRC/JoystickSteuerung.ino

@ -64,5 +64,11 @@ void joystickInit() {
commands[7] = highByte(driveTimeout);
commands[8] = lowByte(driveTimeout);
commands[9] = goDrive;
commands[10] = getTemp;
commands[11] = highByte(temperature);
commands[12] = lowByte(temperature);
commands[13] = getTemp;
commands[14] = highByte(distance);
commands[15] = lowByte(distance);
radio.write(&commands, sizeof(commands));
}

2
Code/miniRobotRC/_main.ino

@ -3,8 +3,6 @@
#include <Arduino.h>
long timer;
int distance;
int temperature;
void inline clearCommands() {
for(uint8_t i=0; i<32; i++) {

4
Code/miniRobotRC/miniRobotRC.ino

@ -34,6 +34,10 @@ bool forwardA = true;
bool forwardB = true;
bool driveOn = false;
uint16_t driveTimeout = 0;
int distance;
int temperature;
//Funk
#include <SPI.h>
#include <nRF24L01.h>

Loading…
Cancel
Save