new config raum3 ctdo

This commit is contained in:
interfisch 2024-01-12 22:36:33 +01:00
parent 2b8f5381d9
commit 77d5ef1b5c
2 changed files with 8 additions and 8 deletions

View File

@ -165,8 +165,8 @@ void setup() {
//myPort = new Serial(this, "/dev/ttyUSB0", 115200);
myPort = new Serial(this, "COM3", 115200);
myPort = new Serial(this, "/dev/ttyUSB0", 115200);
//myPort = new Serial(this, "COM3", 115200);
}
void Set() {
@ -192,7 +192,6 @@ void printHeightmap() {
myPort.write(writeserial);
}
void Debug() {
String writeserial="debug\n";
myPort.write(writeserial);

View File

@ -35,7 +35,7 @@ void saveHeightmapRaw();
#define PIN_LDR A0 //comment if not used
#define PIN D2
#define PIN D4
#define NUMPIXELS 600
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
@ -267,10 +267,10 @@ void spawnWagon(){
int side_multi=1; //start in forward direction
if (random(0,2)==0){ //spawn from other side
/*if (random(0,2)==0){ //spawn from other side
side_startpos=NUMPIXELS+_randomlength;
side_multi=-1;
}
}*/
//Force start from end of strip
@ -310,8 +310,8 @@ void loop() {
if (millis()-last_ldrread > 10000) {
int _light=analogRead(PIN_LDR);
uint8_t _brightness = constrain(map(_light, LDR_MIN, LDR_MAX, BRIGHTNESS_RUN_MIN, BRIGHTNESS_RUN), BRIGHTNESS_RUN_MIN, BRIGHTNESS_RUN);
Serial.print("kilian="); Serial.println(_light);
Serial.print("ergbebinis="); Serial.println(_brightness);
//Serial.print("kilian="); Serial.println(_light);
//Serial.print("ergbebinis="); Serial.println(_brightness);
strip.setBrightness(_brightness);
last_ldrread=millis();
}
@ -678,6 +678,7 @@ void saveHeightmapRaw(){
c_eepromaddress++;
}
Serial.println("Saved to EEPROM");
EEPROM.commit(); //write changes to eeprom. EEPROM.end() will also commit and release the ram copy of eeprom contents
}