version 1.1
This commit is contained in:
+1
-1
@@ -51,7 +51,7 @@ void OledDisplay::writeLine(char* msg, int line) {
|
||||
y -= 5 * 10;
|
||||
}
|
||||
display.setCursor(x, y);
|
||||
display.print(" "); // Print spaces to clear the line
|
||||
display.print(" "); // Print spaces to clear the line
|
||||
display.setCursor(x, y);
|
||||
display.print(msg);
|
||||
display.display();
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#DroneController
|
||||
|
||||
|
||||
Is a Arduino Script for controlling a drone with a controller
|
||||
+3
-8
@@ -26,19 +26,14 @@ void RadioController::setup(int cepin, int cspin) {
|
||||
Serial.println("Error initializing radio");
|
||||
} else {
|
||||
Serial.println("Succesfully initializing radio");
|
||||
// radio.openWritingPipe(writePipe);
|
||||
// radio.openReadingPipe(1, readPipe);
|
||||
// radio.setPALevel(RF24_PA_MAX);
|
||||
// radio.disableDynamicPayloads();
|
||||
// radio.setAutoAck(false);
|
||||
// radio.setDataRate( RF24_250KBPS );
|
||||
// radio.enableAckPayload();
|
||||
// radio.setRetries(15, 15); // delay, count
|
||||
|
||||
radio.setDataRate( RF24_250KBPS );
|
||||
|
||||
// Set the PA Level low to try preventing power supply related problems
|
||||
// because these examples are likely run with nodes in close proximity to
|
||||
// each other.
|
||||
radio.setPALevel(RF24_PA_LOW); // RF24_PA_MAX is default.
|
||||
radio.setPALevel(RF24_PA_HIGH); // RF24_PA_MAX is default.
|
||||
|
||||
// to use ACK payloads, we need to enable dynamic payload lengths (for all nodes)
|
||||
radio.enableDynamicPayloads(); // ACK payloads are dynamically sized
|
||||
|
||||
@@ -74,7 +74,6 @@ void loop() {
|
||||
previousTime = currentTime; // Update the previous time
|
||||
}
|
||||
|
||||
|
||||
if (digitalRead(left_button) == LOW) {
|
||||
strcat(msgToSend, "Stop|");
|
||||
} else if (digitalRead(up_button) == LOW) {
|
||||
|
||||
Reference in New Issue
Block a user