• Hallo Zusammen, Aufgrund der aktuellen Situation setzten wir die Möglichkeit aus, sich mit Gmail zu registrieren. Wir bitten um Verständnis Das RCMP Team

Projekt ESP32 Arduino RC Sound und Licht Controller

Could you make a video? I can't wait to see it!
Every now and then the indicators just light up. All of them and at low strength.
This is normal and called American blinker mode. The indicators are used as side markers as well as soon as the side lights are on:
#define INDICATOR_SIDE_MARKERS // The indicators are used as side markers as well
You can turn it off in the vehicle .h file by adding // in front of the #define
 

jamin

Mitglied
Been enjoying this project for the last month, Thank you. I have hit a problem I can not solve, so pls help?

I have,
SMT board.
FS_I6X on SBUS
Rev 7.5 firmware

Every vehichle I have tried works fine except when I turn on low beam headlights it also starts engine, blows horn, flashes beacons, and start r turn signal. Switch to high beams and all is good.
 
Zuletzt bearbeitet:
Post your 2_adjustmentsRemote.h and have a close look at adjustmentsRemote.xlsx. I believe, something is wrong with your channel mapping. Also make sure, the dual rates (75% and 100%) on your transmitter are set up correctly.
 

jamin

Mitglied
I. believe Tx is setup correctly. DR at 100% and 75% on channels 2 & 4. 75% with switch A down.


// Select the remote configuration profile you have:
#define FLYSKY_FS_I6X // <------- Select (remove //) one of the remote configurations below
// # define FLYSKY_GT5 // <------- Flysky GT5 / Reely GT6 EVO / Absima CR6P
// # define RGT_EX86100 // <------- MT-305 remote delivered with RGT EX86100 crawler (use PWM communication setting)
// # define MICRO_RC // <------- Don't use this with standard remotes!
// BOARD SETTINGS ********************************************** ************************************************** *****************************
// Choose the board version
// # define PROTOTYPE_36 // 36 or 30 pin board (do not uncomment it or it will cause boot issues!)
// COMMUNICATION SETTINGS ********************************************** ************************************************** ********************
// Choose the receiver communication mode (never uncomment more than one!) !!! ADJUST THEM BEFORE CONNECTING YOUR RECEIVER AND ESC !!!
// PWM servo signal communication (CH1 - CH4, 35, PPM headers, 6 channels) --------
// PWM mode active, if SBUS, IBUS, and PPM are disabled (// in front of #define)
// SBUS communication (SBUS header, 13 channels. This is my preferred communication protocol) --------
#define SBUS_COMMUNICATION // control signals are coming in via the SBUS interface (comment it out for classic PWM RC signals)
boolean sbusInverted = true; // false = wired to non standard (inverted) SBUS signal (for example from my "Micro RC" receiver)
// IBUS communication (RX header, 13 channels not recommended, NO FAILSAFE, if bad contact in iBUS wiring!) --------
// # define IBUS_COMMUNICATION // control signals are coming in via the IBUS interface (comment it out for classic PWM RC signals)
// PPM communication (RX header, 8 channels, working fine, but channel signals are a bit jittery) --------
// # define PPM_COMMUNICATION // control signals are coming in via the PPM interface (comment it out for classic PWM RC signals)
// CHANNEL LINEARITY SETTINGS ********************************************* ************************************************** *****************
// # define EXPONENTIAL_THROTTLE // Exponential throttle curve. Ideal for enhanced slow speed control in crawlers
// # define EXPONENTIAL_STEERING // Exponential steering curve. More steering accuracy around center position
// CONFIGURATION PROFILES ********************************************** ************************************************** *********************
/ *
// Channel settings -----
// Channel assignment
// Assign your remote channels (the green ones in the excel sheet "adjustmentsRemote.xlsx") and the sound controller channels (the blue ones)
// for each function. Depending on your wiring and communication mode, not all channels are usable.
// Example for Flysky: -> connect receiver CH6 with sound controller CH2 etc. Also make sure, you plug in your PWM wires accordingly
// Assign the remote channels and the sound controller channels (change the remote channel numbers in #define accordingly)
// Channels reversed or not: select reversed or not by changing true / false for each channel (if the channel direction is wrong)
// Channels auto zero adjustment or not: select auto zero calibration or not by changing true / false for each channel.
// (don't use it for channels without spring centered neutral position @ 1500 microseconds, for potentiometers or for switches)
// Channels signal range calibration -----
const uint16_t pulseNeutral = 30; // 1500 +/- this value (around 30) is the neutral range
const uint16_t pulseSpan = 480; // in theory 500 (1500 center position +/- 500 = 1000 - 2000ms) usually about 480
// Automatic or manual modes -----
// # define AUTO_LIGHTS // Lights controlled by engine state or controller CH5
// # define AUTO_ENGINE_ON_OFF // Engine switching on / off automatically via throttle stick and timer or manually by controller CH5
// # define AUTO_INDICATORS // Indicators triggered automatically by steering angle or manually by controller CH6
* /
// Flysky FS-i6X remote configuration profile ----------------------------------------- -------------------------------------------------- --------
#ifdef FLYSKY_FS_I6X
// Channel assignment (use NONE for non existing channels!)
// Remote channel ####### // Sound controller channel ################################ ########
#define STEERING 1 // CH1 steering
#define GEARBOX 6 // CH2 3 position switch for gearbox (left throttle in tracked mode)
#define THROTTLE 3 // CH3 throttle & brake (right throttle in tracked mode)
#define HORN 5 // CH4 horn and bluelight / siren
#define FUNCTION_R 2 // CH5 jake brake, high / low beam, headlight flasher, engine on / off
#define FUNCTION_L 4 // CH6 indicators, hazards
#define POT2 8 // CH7 pot 2
#define MODE1 7 // CH8 mode 1 switch
#define MODE2 9 // CH9 mode 2 switch
#define MOMENTARY1 NONE // CH10
#define HAZARDS NONE // CH11
#define INDICATOR_LEFT NONE // CH12
#define INDICATOR_RIGHT NONE // CH13
// Channels reversed or not
boolean channelReversed [14] = {
false, // CH0 (unused)
false, // CH1
false, // CH2
false, // CH3
false, // CH4
true, // CH5
false, // CH6
false, // CH7
false, // CH8
false, // CH9
false, // CH10
false, // CH11
false, // CH12
false // CH13
};
// Channels auto zero adjustment or not (don't use it for channels without spring centered neutral position, switches or unused channels)
boolean channelAutoZero [14] = {
false, // CH0 (unused)
false, // CH1
false, // CH2
true, // CH3
false, // CH4
false, // CH5
false, // CH6
false, // CH7
false, // CH8
false, // CH9
false, // CH10
false, // CH11
false, // CH12
false // CH13
};
// Channels signal range calibration -----
const uint16_t pulseNeutral = 30;
const uint16_t pulseSpan = 480;
// Automatic or manual modes -----
// # define AUTO_LIGHTS
// # define AUTO_ENGINE_ON_OFF
// # define AUTO_INDICATORS
#endif
// Flysky GT5 / Reely GT6 EVO / Absima CR6P remote configuration profile (thanks to BlackbirdXL1 for making this profile) -----------------------
#ifdef FLYSKY_GT5
/ * Communication settings (above): -----------------------
* #define IBUS_COMMUNICATION // Use IBUS (tested with FS-IA6B receiver)
* /
/ * Transmitter settings -----------------------
* EPA menu:
* select AUX 3
* LFU 100%, RBD 75%
* select AUX 6
* LFU 75%, RBD 75%
*
* SVC off
* CRAWL off
*
* Save
* /
/ * Remote channel functions -----------------------
* Channel 1 = Steering and automatic indicators
* Channel 2 = Throttle & brake reversing lights
* Channel 3 = Push button on the transmitter grip = hazards on / off
* Channel 4 = 3 position switch on the transmitter grip = gearbox shifting
* Channel 5 = left pot: left turn = blue lights & siren, right turn = horn
* Channel 6 = right pot: left turn = engine start / stop, right turn = light sequences switching (hold it in end position, then return to center pos.)
* /
// Channel assignment (use NONE for non existing channels!)
// Remote channel ####### // Sound controller channel ################################ ########
#define STEERING 1 // CH1 steering
#define GEARBOX 4 // CH2 3 position switch for gearbox (left throttle in tracked mode)
#define THROTTLE 2 // CH3 throttle & brake (right throttle in tracked mode)
#define HORN 5 // CH4 horn and bluelight / siren
#define FUNCTION_R 6 // CH5 jake brake, high / low beam, headlight flasher, engine on / off
#define FUNCTION_L 1 // CH6 indicators, hazards
#define POT2 NONE // CH7 pot 2
#define MODE1 NONE // CH8 mode 1 switch
#define MODE2 NONE // CH9 mode 2 switch
#define MOMENTARY1 NONE // CH10
#define HAZARDS 3 // CH11
#define INDICATOR_LEFT NONE // CH12
#define INDICATOR_RIGHT NONE // CH13
// Channels reversed or not
boolean channelReversed [14] = {
false, // CH0 (unused)
false, // CH1
false, // CH2
false, // CH3
false, // CH4
true, // CH5
false, // CH6
false, // CH7
false, // CH8
false, // CH9
false, // CH10
false, // CH11
false, // CH12
false // CH13
};
// Channels auto zero adjustment or not (don't use it for channels without spring centered neutral position, switches or unused channels)
boolean channelAutoZero [14] = {
false, // CH0 (unused)
true, // CH1
false, // CH2
true, // CH3
false, // CH4
true, // CH5
true, // CH6
false, // CH7
false, // CH8
false, // CH9
false, // CH10
false, // CH11
false, // CH12
false // CH13
};
// Channels signal range calibration -----
const uint16_t pulseNeutral = 30;
const uint16_t pulseSpan = 480;
// Automatic or manual modes -----
// # define AUTO_LIGHTS
// # define AUTO_ENGINE_ON_OFF
#define AUTO_INDICATORS
#endif
// RGT MT-305 configuration profile (comes with EX86100) -----------------------
#ifdef RGT_EX86100
/ * Communication settings (above): -----------------------
* Use PWM communication mode
* /
/ * Transmitter settings -----------------------
* CH1 & 2 reverse: R
* CH2 EPA (LO & HI): max.
* CH1 DR: about 60% (so that the steerning servo is not pushing against end stops)
* CH1 center position: 0
* CH2 center position: around 0, so that the vehicle is driving a straight line
*
* NOTE: do not adjust the settings above without rebooting the ESP32!
*
* /
/ * Remote channel functions -----------------------
* Channel 1 = Steering and automatic indicators
* Channel 2 = Throttle & brake reversing lights
* Channel 3 = 2 position switch on the transmitter grip = horn on / off
* /
// Channel assignment (use NONE for non existing channels!)
// Remote channel ####### // Sound controller channel ################################ ########
#define STEERING 1 // CH1 steering
#define GEARBOX NONE // CH2 3 position switch for gearbox (left throttle in tracked mode)
#define THROTTLE 2 // CH3 throttle & brake (right throttle in tracked mode)
#define HORN 3 // CH4 horn and bluelight / siren
#define FUNCTION_R NONE // CH5 jake brake, high / low beam, headlight flasher, engine on / off
#define FUNCTION_L NONE // CH6 indicators, hazards
#define POT2 NONE // CH7 pot 2
#define MODE1 NONE // CH8 mode 1 switch
#define MODE2 NONE // CH9 mode 2 switch
#define MOMENTARY1 NONE // CH10
#define HAZARDS NONE // CH11
#define INDICATOR_LEFT NONE // CH12
#define INDICATOR_RIGHT NONE // CH13
// Channels reversed or not
boolean channelReversed [14] = {
false, // CH0 (unused)
false, // CH1
false, // CH2
true, // CH3
true, // CH4
true, // CH5
false, // CH6
false, // CH7
false, // CH8
false, // CH9
false, // CH10
false, // CH11
false, // CH12
false // CH13
};
// Channels auto zero adjustment or not (don't use it for channels without spring centered neutral position, switches or unused channels)
boolean channelAutoZero [14] = {
false, // CH0 (unused)
true, // CH1
false, // CH2
true, // CH3
false, // CH4
false, // CH5
false, // CH6
false, // CH7
false, // CH8
false, // CH9
false, // CH10
false, // CH11
false, // CH12
false // CH13
};
// Channels signal range calibration -----
const uint16_t pulseNeutral = 30;
const uint16_t pulseSpan = 500;
// Automatic or manual modes -----
#define AUTO_LIGHTS
#define AUTO_ENGINE_ON_OFF
#define AUTO_INDICATORS
#endif

// "Micro RC" DIY Arduino remote configuration profile --------------------------------------- -------------------------------------------------- -
#ifdef MICRO_RC
// Channel assignment (use NONE for non existing channels!)
// Remote channel ####### // Sound controller channel ################################ ########
#define STEERING 1 // CH1 steering
#define GEARBOX 2 // CH2 3 position switch for gearbox (left throttle in tracked mode)
#define THROTTLE 3 // CH3 throttle & brake (right throttle in tracked mode)
#define HORN 5 // CH4 horn and bluelight / siren
#define FUNCTION_R 4 // CH5 jake brake, high / low beam, headlight flasher, engine on / off
#define FUNCTION_L NONE // CH6 indicators, hazards
#define POT2 16 // CH7 pot2
#define MODE1 6 // CH8 mode 1 switch
#define MODE2 7 // CH9 mode 2 switch
#define MOMENTARY1 8 // CH10
#define HAZARDS 9 // CH11
#define INDICATOR_LEFT 10 // CH12
#define INDICATOR_RIGHT 11 // CH13
// Channels reversed or not
boolean channelReversed [14] = {
false, // CH0 (unused)
false, // CH1
false, // CH2
false, // CH3
false, // CH4
false, // CH5
false, // CH6
false, // CH7
true, // CH8
true, // CH9
false, // CH10
false, // CH11
false, // CH12
false // CH13
};
// Channels auto zero adjustment or not (don't use it for channels without spring centered neutral position, switches or unused channels)
boolean channelAutoZero [14] = {
false, // CH0 (unused)
true, // CH1
false, // CH2
true, // CH3
false, // CH4
true, // CH5
false, // CH6
false, // CH7
false, // CH8
false, // CH9
false, // CH10
false, // CH11
false, // CH12
false // CH13
};
// Channels signal range calibration -----
const uint16_t pulseNeutral = 30;
const uint16_t pulseSpan = 480;
// Automatic or manual modes -----
// # define AUTO_LIGHTS
// # define AUTO_ENGINE_ON_OFF
#define AUTO_INDICATORS
#endif
 

jamin

Mitglied
This is the long explanation of the problem:

SwA down=75% on right vert, stick

1. Long up on right stick turns on cablights and side lights.
2. Second long up turns on low beam headlights, beacons, motor and right turn.

SwA up=100% on right vert, stick

1. Short up turns on high beam headlights, turn beacons off.
2. Another short up back to low beams and beacons flashing turn signal.
3. use left stick to turn off turn signal.

SwA down

1. Long up on right stick turns on fog light
2. long up turns off all lights
 

jamin

Mitglied
// Headlights
if (!head) { // OFF, but flasher active
if (!headLightsFlasherOn) headLight.off(); else headLight.on();
xenonMillis = millis();
headLightsHighBeamOn = true;
}
else { //ON
headLight.pwm(constrain(255 - crankingDim - dipDim + xenonIgnitionFlash, 0, 255));
}
Changing this line in RC_ENGINE_SOUND_ESP32.ino
from FALSE to TRUE will "FIX" the problem until I turn on low beams.
 

Tody79

Mitglied
Hallo Martin.

Ich bin nun auch soweit. Dein Modul hat die ersten Töne ausgegeben, die LEDs funktionieren.


Zunächst habe ich es mit einem Servotester probiert, aber das klappte nicht. Über SBUS angesteuert macht es aber alles, was es soll.
Vielen Dank für die Arbeit, und das Veröffentlichen. Jetzt werde ich daran gehen, und den Code derart ändern, dass ich einen Kippantrieb abhängig von Endschaltern ansteuern kann. Und dann einen eigenen Sound einspielen. Bin schon gespannt.


Viele Grüße

David
 
Zuletzt bearbeitet:
// Headlights
if (!head) { // OFF, but flasher active
if (!headLightsFlasherOn) headLight.off(); else headLight.on();
xenonMillis = millis();
headLightsHighBeamOn = true;
}
else { //ON
headLight.pwm(constrain(255 - crankingDim - dipDim + xenonIgnitionFlash, 0, 255));
}
Changing this line in RC_ENGINE_SOUND_ESP32.ino
from FALSE to TRUE will "FIX" the problem until I turn on low beams.
I don't see the sense of this change. The only thing it does is breaking the light function. I believe something is wrong with your LED wiring. Did you use series resistors?
 

GeeKaa

Mitglied
I had a problem with fs-16X dual rate configuration.

This is what I did.
assign switches: fly mode SwA from none to normal, hold cancel.
Dual rate: Ch2 :SwA up, normal 100, SwA down, sport 75, hold cancel.
Dual rate: Ch3 :SwA up, normal 100, SwA down, sport 75, hold cancel.
Display: SwA up, everything oke. SwA down, nothing.:(
What went wrong?
again, again, again....
Then I tried the same with SwB.... Works like a charm.????? Why???
At last I found SwA was connected to trainer mode.
Disconected there and everything was as expected.:)
May be this is helpfull.
 

Bastler1024

Mitglied
Ich habe auf Basis des ESP32 mini Moduls eine Schaltung zusammengebaut für die Tests. Vor allem für die schnelle Entwicklung der Instrumententafel. Dabei ist mir aufgefallen, dass der Wert "currentSpeed" in jedem Gang (manuell 3-Gang-Getriebe) bis zum maxmalen Wert geht. Nach dem Hoch-Schalten dann zurück springt. Das Verhalten würde zur Drehzahl passen, aber nicht zur Geschwindigkeit. Ist das so gewollt?

 
D

Deleted member 1492

Gast
Magst Du auch was über die Instrumententafel schreiben?
Sieht sehr interessant aus, ein Bericht darüber wäre klasse. :thumbsup:
 
Das ist ja toll, diese Instrumententafel! Ja klar, im Modus mit echtem Schaltgetriebe müsstest du die Geschwindigkeit noch mit dem entsprechenden Übersetzungsverhältnis multiplizieren. Das kannst du ja in deiner Software machen.

Zu obigem Problem mit der Dual Rate kann ich momentan leider keine Auskunft geben, da ich in den Ferien bin. :cool:
 

GeeKaa

Mitglied
Zu obigem Problem mit der Dual Rate kann ich momentan leider keine Auskunft geben, da ich in den Ferien bin. :cool:


Good afternoon Martin.
Dual rate is not a problem. I posted what was wrong with me. Might be useful for others with the same "error".
Das ist ja toll, diese Instrumententafel! Ja klar, im Modus mit echtem Schaltgetriebe müsstest du die Geschwindigkeit noch mit dem entsprechenden Übersetzungsverhältnis multiplizieren. Das kannst du ja in deiner Software machen.
 

Bastler1024

Mitglied
Habe meine Anpassungen commited: https://github.com/Gamadril/Rc_Engine_Sound_ESP32

Meine Anpassungen sind teilweise radikal und für mein Modell optimiert, aber die Dashboard Klasse habe ich vom restlichen Code getrennt, sodass sie leicht in andere Projekte integrierbar ist (dashboard.h und dashboard.cpp Dateien). Die öffentlichen Methoden habe ich dokumentiert. Die Konfigurationsdatei für das Display inkl. Anleitung, was damit zu tun ist, ist auch im Repository zu finden.
In der Datei ESP32_LASE.ino ist die aktuelle Verwendung zu sehen. Die Geschwindigkeitsanzeige habe ich mit dem Tipp von Martin angepasst, sodass es keine Sprünge beim Hochschalten mehr gibt. Ich mach später ein neues Video.
 
Zuletzt bearbeitet:
Top Bottom