![image001 image001](https://sim-pc.de/wp-content/gallery/e36-platinen/thumbs/thumbs_image001.jpg)
![Mega2-900 Mega2-900](https://sim-pc.de/wp-content/gallery/e36-schaltungen/thumbs/thumbs_Mega2-900.jpg)
![BMW e36 Tachosteckerbelegung BMW e36 Tachosteckerbelegung](https://sim-pc.de/wp-content/gallery/e36-schaltungen/thumbs/thumbs_bmw_e36_cluster.jpg)
![shifter shifter](https://sim-pc.de/wp-content/gallery/e36-cockpit/thumbs/thumbs_shifter.jpg)
![tacho_280 tacho_280](https://sim-pc.de/wp-content/gallery/e36-cockpit/thumbs/thumbs_tacho_280.jpg)
Da doch einige Anfragen zur Ansteuerung eines TM1638 mit dem rcc gekommen sind, habe ich hier mal ein einfaches Beispiel für eine Drehzahlanzeige gemacht.
//https://github.com/rjbatista/tm1638-library
#include
// define a module on data (DIO) pin 8, clock (CLK) pin 9
// and strobe (STB0)pin 10
TM1638 module(8, 9, 10);
String ver = "2.0.0.0";
const int nChar = 30; // size of char
String inString = ""; // a string to hold incoming data
boolean stringComplete = false; // whether the string is complete
int vRpm;
void setup()
{
Serial.begin(38400);
}
void readdata() {
if (stringComplete) {
if (inString.substring(0, 2) == "RR") {
vRpm = inString.substring(2, 6).toInt();
module.setDisplayToDecNumber(vRpm * 10,0,false);
}
inString = "";
stringComplete = false;
}
}
void serialReadEvent() {
while (Serial.available()) {
char inChar = (char)Serial.read();
inString += inChar;
if (inChar == ';') {
stringComplete = true;
}
}
}
void loop() {
serialReadEvent();
readdata();
}