Arduino Dishwasher
This is my first post of many which I intend to write, so why not start with something complicated?.
In this occasion I will tell you step by step the electronic design of a dishwasher using arduino. I have only seen one project finished of a dishwasher using arduino of which a took some lines of codes for the temperature sensor, which in their turn was taken from arduino playground. This is the page of the other dishwasher. http://www.neonsquirt.com/dishwasher.html
The history of the Riveratek dishwasher with arduino.
I took the dishwasher of a friend’s mother that was broken, of the Brand Atlas model. DM4506 these dishwashers are chinese and there isn’t much information about them, I could only find the owners manual in swedish.
My idea was to fix it and return it to it’s owner without charging for the labour, of the reparation her son would only pay the material used. Therefore when the dischwasher was delivered to my home the first thing I did was checking the fault and fortunately the fault was the electronic board, I say fortunately because if it had been something else, this project would not have come to exist.
I tried obtaining the circuit board without any luck, so this was when I decided to make the board with an arduino.
Let’s get started (RiveraTek dishwasher with arduino).
When thinking of the materials that I would use and how the project would be, I decided to use a prototyping PCB board to make the relay circuit board, I choose to use small relays with an adecuated amperaje for the function of the dishwasher, these would be controlled by an arduino pro mini and to be visualised by an lcd screen.
[imageeffect type=”frame” align=”aligncenter” width=”500″ lightbox=”yes” height=”420″ alt=”” url=”http://riveratek.com/wp-content/uploads/2013/01/SL382201.jpg” ]
The first thing I did was to disassembly the original electronic board to later take some pieces and re-use.
[imageeffect type=”frame” align=”aligncenter” width=”500″ lightbox=”yes” height=”420″ alt=”” url=”http://riveratek.com/wp-content/uploads/2013/01/SL382203.jpg” ]
The relays should control 6 devices of the dishwasher: Drain pump, wash pump, let in valve, soap solenoid, regeneration solenoid and heather.
The other 8 devices that the dishwasher has I was thinking about connecting in diverse ways to the arduino but for some fault in my programmation or something that I never understood I only connected 7 of the 8 mentioned: Door switch, program select key, start button, fill sensor, temperature sensor, lcd screen. The missing device and that gave me some problems was the (security device of the dishwasher which I used as a current switch).
So I got to work and started to design what the board should look like with the relays, and I made them fit above a plastic that was from the original board and this was the result.
[imageeffect type=”frame” align=”aligncenter” width=”500″ lightbox=”yes” height=”420″ alt=”” url=”http://riveratek.com/wp-content/uploads/2013/01/SL382207.jpg” ]
After this I dedicated myself making the conductive tracks on the board and putting terminals to be able to make the connections towards the arduino. I also used a switching power supply of 5V 2A to supply the relays and the arduino.
[imageeffect type=”frame” align=”aligncenter” width=”500″ lightbox=”yes” height=”420″ alt=”” url=”http://riveratek.com/wp-content/uploads/2013/01/SL382209.jpg”]
After I made the connection of the lcd to the arduino and started making the program commencing with the display, select key, start button and thermometer (for this I used the same termistor that came with the dishwasher a 10k NTC).
Not forgetting the hole that would be placed on the front of the dishwasher for the lcd where an acrylic rectangle was placed which was cut out previously.
[styledbox type=”shadow” width=”” align=”center”]
[/styledbox]
I connected all the relays to their respective device, performing tests with the limited programming that it had, this was a little uncomfortable because I had to do it in the kitchen and I have no dishwasher connection, from the tap I had to use an adaptor to connect the water hose, I also used a wooden chair as a working bench and the most uncomfortable part was working on the floor.
[imageeffect type=”frame” align=”aligncenter” width=”500″ lightbox=”yes” height=”420″ alt=”” url=”http://riveratek.com/wp-content/uploads/2013/01/SL382211.jpg”]
After seeing that all the relays were working and the devices were functioning well, I decided to mount all the curcuits in the front panel of the dishwasher.
[imageeffect type=”frame” align=”aligncenter” width=”500″ lightbox=”yes” height=”420″ alt=”” url=”http://riveratek.com/wp-content/uploads/2013/01/SL382226.jpg” ]
For the circuit I left some terminals for future updates.
[imageeffect type=”frame” align=”aligncenter” width=”500″ lightbox=”yes” height=”420″ alt=”” url=”http://riveratek.com/wp-content/uploads/2013/01/SL382228.jpg” ]
This is the finished dishwasher without the front lid but it’s 100% working.
[imageeffect type=”frame” align=”aligncenter” width=”500″ lightbox=”yes” height=”420″ alt=”” url=”http://riveratek.com/wp-content/uploads/2013/01/SL382229.jpg” ]
- //Dishwasher v.1.0.
- //Programer: Pedro Rivera.
- //Program to arduino duemillanove o mini arduino pro.
- //A dishwasher controller with 5 different wash programs,
- //temperature control thermistor 10k.
- //6 relay control opto-isolator
- //Licensed under Creative Commons.
- #include <math.h>
- #include <LiquidCrystal.h>
- //Pin assignment
- LiquidCrystal lcd(8, 9, 10, 11, 12, 13);
- #define doorBtn 2 //door button
- #define errorSens 3 //overfill sensor error
- #define drainPump 4 //drain pump
- #define soapSolen 5 //Solenoid soap dispenser
- #define inletValve 6 //water inlet valve
- #define regenSolen 7 //regeneration solenoid
- #define keySelect A0 //select key
- #define startBtn A1 //start button
- #define fillSens A2 //fill sensor
- #define tempSensor A3 //temperature sensor
- #define heater A4 //heater
- #define washPump A5 //washpump
- //constants declaration
- const int btnStrong = 1;
- const int btnNormal = 2;
- const int btnEconom = 3;
- const int btnFast = 4;
- const int btnRinse = 5;
- const int btnNone = 6;
- //variables declaration
- unsigned long periodStart, periodFinished, periodElapsed;
- unsigned long periodStart2, periodFinished2, periodElapsed2;
- volatile int doorBtnState = 0;
- double tempArray[25];
- byte arrayIndex = 0;
- int lcdKeyMenu = 0;
- int selKeyIN = 0;
- int startBtnState = 0;
- int fillSensState = 0;
- int tempLimit = 57;
- int x = 0;
- //actions
- int readKey(){ //read startup programs select key
- selKeyIN = analogRead(keySelect); //read the value from the sensor
- if (selKeyIN < 300) return btnRinse;
- if (selKeyIN < 500) return btnEconom;
- if (selKeyIN < 600) return btnNormal;
- if (selKeyIN < 700) return btnStrong;
- if (selKeyIN < 999) return btnFast; return btnNone; }
- double waterTemp() { //subroutine taken from www.neonsquirt.com/
- if (arrayIndex> 23) {//which in its turn was taken from Arduino Playground
- arrayIndex=0;
- }
- else {
- arrayIndex++;
- }
- double Temp; // The Thermistor2 "Simple Code"
- int RawADC = analogRead(tempSensor);
- Temp = log(((10240000/RawADC) - 10000));
- Temp = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * Temp * Temp ))* Temp );
- Temp = Temp - 273.15; //convert kelvin to celsious
- tempArray[arrayIndex]=Temp;
- Temp=0;
- for (int i=0; i<24; i++) {
- Temp += tempArray[i];
- }
- return (Temp / 25); // return the average temperature of the array
- }
- void dispTemp(){
- lcd.setCursor(0,4);
- lcd.print("Temperature: ");
- lcd.print(int(waterTemp()));
- lcd.print((char)223);
- lcd.print("C ");
- }
- void Welcome(){
- lcd.clear();
- lcd.setCursor(0,0);
- lcd.print(" Welcome ");
- lcd.setCursor(0,1);
- lcd.print(" Dishwasher ");
- lcd.setCursor(0,2);
- lcd.print(" with Arduino ");
- lcd.setCursor(0,3);
- lcd.print(" RiveraTek Rev 1.0");
- delay(5000);
- lcd.clear();
- }
- void Finish(){
- lcd.clear();
- lcd.setCursor(0,0);
- lcd.print(" Clean dishes ");
- lcd.setCursor(0,1);
- lcd.print(" Press the off button ");
- lcd.setCursor(0,2);
- lcd.print(" for finish" );
- while (true){};
- }
- void selMenu(){
- lcd.setCursor(0,0);
- lcd.print(" Select ");
- lcd.setCursor(0,1);
- lcd.print(" a program ");
- lcd.setCursor(0,2);
- lcd.print(" and press start ");
- lcd.setCursor(0,3);
- lcd.print(" for initiate ");
- actStartBtn();
- }
- void actStartBtn(){ //start button action
- startBtnState = digitalRead(startBtn);
- while (startBtnState == HIGH){
- startBtnState = digitalRead(startBtn);
- }
- }
- void actDoorBtn() { // swich door action
- digitalWrite(heater, LOW);
- digitalWrite(washPump, LOW);
- digitalWrite(soapSolen, LOW);
- digitalWrite(drainPump, LOW);
- digitalWrite(inletValve, LOW);
- digitalWrite(regenSolen, LOW);
- doorBtnState = digitalRead(doorBtn);
- while (doorBtnState == HIGH){
- doorBtnState = digitalRead(doorBtn);
- }
- }
- void actErrorSens(){
- cli();
- digitalWrite(heater, LOW);
- digitalWrite(washPump, LOW);
- digitalWrite(soapSolen, LOW);
- digitalWrite(drainPump, LOW);
- digitalWrite(inletValve, LOW);
- digitalWrite(regenSolen, LOW);
- lcd.setCursor(0,0);
- lcd.print(" ERROR ");
- lcd.setCursor(0,1);
- lcd.print(" DISCONNECT ");
- lcd.setCursor(0,2);
- lcd.print(" THE DISHWASHER ");
- lcd.setCursor(0,3);
- lcd.print(" FROM SOCKET ");
- while (true){};
- }
- void actSoapSolenONE(){
- digitalWrite(soapSolen, HIGH);
- periodStart2 = millis();
- timeElapsed2();
- while(periodElapsed2 < 3000){
- timeElapsed2();
- }
- digitalWrite(soapSolen, LOW);
- }
- void actFill(){
- lcd.setCursor(0,2);
- lcd.print(" Filling ");
- digitalWrite(inletValve, HIGH);
- periodStart2 = millis();
- timeElapsed2();
- while(periodElapsed2 < 7000){
- digitalWrite(inletValve, HIGH);
- timeElapsed2();
- }
- digitalWrite(washPump, HIGH);
- digitalWrite(inletValve, HIGH);
- fillSensState = digitalRead(fillSens);
- while (fillSensState == LOW){
- digitalWrite(washPump, HIGH);
- digitalWrite(inletValve, HIGH);
- fillSensState = digitalRead(fillSens);
- }
- digitalWrite(washPump, HIGH);
- digitalWrite(inletValve, HIGH);
- periodStart2 = millis();
- timeElapsed2();
- while(periodElapsed2 < 10000){
- digitalWrite(inletValve, HIGH);
- digitalWrite(washPump, HIGH);
- timeElapsed2();
- }
- digitalWrite(inletValve, LOW);
- lcd.setCursor(0,2);
- lcd.print(" ");
- digitalWrite(washPump, HIGH);
- }
- void actDrainPumpON(){
- digitalWrite(drainPump, HIGH);
- lcd.setCursor(0,2);
- lcd.print(" Draining ");
- lcd.setCursor(0,3);
- lcd.print(" ");
- }
- void actDrainPumpOFF(){
- digitalWrite(drainPump, LOW);
- lcd.setCursor(0,2);
- lcd.print(" ");
- }
- void actDrain(){
- actDrainPumpON();
- fillSensState = digitalRead(fillSens);
- while (fillSensState == HIGH) {
- actDrainPumpON();
- fillSensState = digitalRead(fillSens);
- }
- actDrainPumpON();
- periodStart2 = millis();
- timeElapsed2();
- while(periodElapsed2 < 30000){
- actDrainPumpON();
- timeElapsed2();
- }
- actDrainPumpOFF();
- }
- void actHeaterON(){
- digitalWrite(heater, HIGH);
- }
- void actHeaterOFF(){
- digitalWrite(heater, LOW);
- }
- void actPreWashON(){
- digitalWrite(washPump, HIGH);
- lcd.setCursor(0,2);
- lcd.print(" Prewash ");
- }
- void actPreWashOFF(){
- digitalWrite(washPump, LOW);
- lcd.setCursor(0,2);
- lcd.print(" ");
- }
- void actWashON(){
- digitalWrite(washPump, HIGH);
- lcd.setCursor(0,2);
- lcd.print(" Washing ");
- }
- void actWashOFF(){
- digitalWrite(washPump, LOW);
- lcd.setCursor(0,2);
- lcd.print(" ");
- }
- void timeElapsed(){
- periodFinished= millis();
- periodElapsed = (periodFinished - periodStart);
- }
- void timeElapsed2(){
- periodFinished2 = millis();
- periodElapsed2 = (periodFinished2 - periodStart2);
- }
- void actRinse(){
- lcd.setCursor(0,1);
- lcd.print(" Rinse ");
- actFill();
- actWashON();
- periodStart = millis();
- timeElapsed();
- while(periodElapsed < 390000){
- actWashON();
- timeElapsed();
- }
- actWashOFF();
- pause();
- actDrain();
- }
- void actClearRinse(){
- lcd.setCursor(0,1);
- lcd.print(" Clear rinse ");
- actFill();
- actWashON();
- actHeaterON();
- while(waterTemp() < 48){
- actHeaterON();
- actWashON();
- dispTemp();
- }
- actWashON();
- actHeaterON();
- digitalWrite(soapSolen, HIGH);
- periodStart = millis();
- timeElapsed();
- while(periodElapsed < 60000){
- actWashON();
- actHeaterON();
- digitalWrite(soapSolen, HIGH);
- timeElapsed();
- }
- actWashON();
- actHeaterON();
- digitalWrite(soapSolen, LOW);
- periodStart = millis();
- timeElapsed();
- while(periodElapsed < 3000){
- actWashON();
- actHeaterON();
- digitalWrite(soapSolen, LOW);
- timeElapsed();
- }
- actWashON();
- actHeaterON();
- digitalWrite(soapSolen, HIGH);
- periodStart = millis();
- timeElapsed();
- while(periodElapsed < 60000){
- actWashON();
- actHeaterON();
- digitalWrite(soapSolen, HIGH);
- timeElapsed();
- }
- digitalWrite(soapSolen, LOW);
- actWashON();
- actHeaterON();
- while(waterTemp() < tempLimit){
- actHeaterON();
- actWashON();
- dispTemp();
- }
- actWashON();
- actHeaterOFF();
- periodStart = millis();
- timeElapsed();
- while(periodElapsed < 60000){
- actWashON();
- timeElapsed();
- }
- actWashOFF();
- pause();
- actDrain();
- }
- void actDry(){
- lcd.setCursor(0,1);
- lcd.print(" Secando ");
- periodStart = millis();
- timeElapsed();
- while(periodElapsed < 120000){
- timeElapsed();
- }
- digitalWrite(regenSolen, HIGH);
- actDrain();
- periodStart = millis();
- timeElapsed();
- while(periodElapsed < 60000){
- timeElapsed();
- }
- periodStart = millis();
- timeElapsed();
- while(periodElapsed < 1000){
- digitalWrite(inletValve, HIGH);
- timeElapsed();
- }
- digitalWrite(inletValve, LOW);
- periodStart = millis();
- timeElapsed();
- while(periodElapsed < 3000){
- timeElapsed();
- }
- periodStart = millis();
- timeElapsed();
- while(periodElapsed < 1000){
- digitalWrite(inletValve, HIGH);
- timeElapsed();
- }
- digitalWrite(inletValve, LOW);
- digitalWrite(regenSolen, LOW);
- actDrain();
- periodStart = millis();
- timeElapsed();
- while(periodElapsed < 660000){
- timeElapsed();
- }
- actDrain();
- }
- void pause(){
- periodStart = millis();
- timeElapsed();
- while(periodElapsed < 3000){
- timeElapsed();
- }
- }
- //programs
- void wStrong(){
- lcd.setCursor(0,0);
- lcd.print(" Intensive Wash ");
- lcd.setCursor(0,1);
- lcd.print(" ");
- lcd.setCursor(0,2);
- lcd.print(" ");
- lcd.setCursor(0,3);
- lcd.print(" ");
- actDrain();
- pause();
- actFill();
- pause();
- actPreWashON();
- while(waterTemp() < 36){
- actPreWashON();
- actHeaterON();
- dispTemp();
- }
- actHeaterOFF();
- periodStart = millis();
- timeElapsed();
- while(periodElapsed < 180000){
- actPreWashON();
- dispTemp();
- timeElapsed();
- }
- actPreWashOFF();
- pause();
- actDrain();
- pause();
- actFill();
- pause();
- actSoapSolenONE();
- while(waterTemp() < 59){
- actWashON();
- actHeaterON();
- dispTemp();
- }
- actHeaterOFF();
- periodStart = millis();
- timeElapsed();
- while(periodElapsed < 720000){
- actWashON();
- dispTemp();
- timeElapsed();
- }
- actWashOFF();
- pause();
- actDrain();
- pause();
- actRinse();
- pause();
- actRinse();
- pause();
- actClearRinse();
- pause();
- actDry();
- Finish();
- }
- void wNormal(){
- lcd.setCursor(0,0);
- lcd.print(" Normal Wash ");
- lcd.setCursor(0,1);
- lcd.print(" ");
- lcd.setCursor(0,2);
- lcd.print(" ");
- actDrain();
- pause();
- actFill();
- pause();
- actPreWashON();
- periodStart = millis();
- timeElapsed();
- while(periodElapsed < 360000){
- actPreWashON();
- dispTemp();
- timeElapsed();
- }
- actPreWashOFF();
- pause();
- actDrain();
- pause();
- actFill();
- pause();
- actSoapSolenONE();
- while(waterTemp() < 55){
- actWashON();
- actHeaterON();
- dispTemp();
- }
- actHeaterOFF();
- periodStart = millis();
- timeElapsed();
- while(periodElapsed < 840000){
- actWashON();
- dispTemp();
- timeElapsed();
- }
- actWashOFF();
- pause();
- actDrain();
- pause();
- actRinse();
- pause();
- actClearRinse();
- pause();
- actDry();
- Finish();
- }
- void wEconom(){
- lcd.setCursor(0,0);
- lcd.print(" Eco Wash ");
- lcd.setCursor(0,1);
- lcd.print(" ");
- lcd.setCursor(0,2);
- lcd.print(" ");
- actDrain();
- pause();
- actFill();
- pause();
- actPreWashON();
- periodStart = millis();
- timeElapsed();
- while(periodElapsed < 480000){
- actPreWashON();
- dispTemp();
- timeElapsed();
- }
- actPreWashOFF();
- pause();
- actDrain();
- pause();
- actFill();
- pause();
- actSoapSolenONE();
- while(waterTemp() < 41){
- actWashON();
- actHeaterON();
- dispTemp();
- }
- actHeaterOFF();
- periodStart = millis();
- timeElapsed();
- while(periodElapsed < 600000){
- actWashON();
- dispTemp();
- timeElapsed();
- }
- while(waterTemp() < 48){
- actWashON();
- actHeaterON();
- dispTemp();
- }
- actHeaterOFF();
- periodStart = millis();
- timeElapsed();
- while(periodElapsed < 30000){
- actWashON();
- dispTemp();
- timeElapsed();
- }
- actWashOFF();
- pause();
- actDrain();
- pause();
- actRinse();
- pause();
- actClearRinse();
- pause();
- actDry();
- Finish();
- }
- void wFast(){
- tempLimit = 48;
- lcd.setCursor(0,0);
- lcd.print(" Quick Wash ");
- lcd.setCursor(0,1);
- lcd.print(" ");
- lcd.setCursor(0,2);
- lcd.print(" ");
- actDrain();
- pause();
- actFill();
- pause();
- actSoapSolenONE();
- while(waterTemp() < 36){
- actWashON();
- actHeaterON();
- dispTemp();
- }
- actHeaterOFF();
- periodStart = millis();
- timeElapsed();
- while(periodElapsed < 240000){
- actWashON();
- dispTemp();
- timeElapsed();
- }
- actWashOFF();
- pause();
- actDrain();
- pause();
- actRinse();
- pause();
- actClearRinse();
- pause();
- actDry();
- Finish();
- }
- void wRinse(){
- lcd.setCursor(0,0);
- lcd.print(" Rinse ");
- lcd.setCursor(0,1);
- lcd.print(" ");
- lcd.setCursor(0,2);
- lcd.print(" ");
- actDrain();
- pause();
- actFill();
- pause();
- actPreWashON();
- periodStart = millis();
- timeElapsed();
- while(periodElapsed < 360000){
- actPreWashON();
- dispTemp();
- timeElapsed();
- }
- actPreWashOFF();
- pause();
- actDrain();
- pause();
- actDry();
- Finish();
- }
- void setup() {
- for (int i=0; i<25; i++) tempArray[i]=21; //first read temperature
- lcd.begin(20,4);
- pinMode(heater, OUTPUT);
- pinMode(washPump, OUTPUT);
- pinMode(soapSolen, OUTPUT);
- pinMode(regenSolen, OUTPUT);
- pinMode(drainPump, OUTPUT);
- pinMode(inletValve, OUTPUT);
- digitalWrite(startBtn, HIGH);
- digitalWrite(fillSens, HIGH);
- digitalWrite(washPump, LOW);
- digitalWrite(drainPump, LOW);
- digitalWrite(inletValve, LOW);
- attachInterrupt(0, actDoorBtn, RISING);
- //attachInterrupt(1, actErrorSens, RISING);
- }
- void loop(){
- Welcome();
- selMenu();
- lcdKeyMenu = readKey(); // read key
- switch (lcdKeyMenu) {
- case 1:
- wStrong();
- break;
- case 2:
- wNormal();
- break;
- case 3:
- wEconom();
- break;
- case 4:
- wFast();
- break;
- case 5:
- wRinse();
- break;
- }
- }
Hi! Tell me please what version of arduino IDE use in this project,
and what is missing in line 8 and line9 ?
include what?
Have a nice day!
I used arduino 1.0.1 but you can use new version ide.
I fix the code in lines 8 and 9
Regards.
Hi! I also installed arduino 1.0.1; found the liquidcristal lcd library;and not find anywhere the math.h library; during compiling the sketch found some error messages
line :52: error: expected unqualified-id before ‘else’
line :57: error: expected constructor,destructor or type conversion before ‘=’ token
line:58: error: expected constructor,destructor or type conversion before ‘=’ token
line:60: error: array bound is not an integer constant
line:60: error: expected constructor,destructor or type conversion before ‘=’ token
line:61: error: expected constructor,destructor or type conversion before ‘=’ token
line:62: error: expected unqualified-id before ‘for’ line:62: error: expected constructor,destructor or type conversion before ‘<' token line:62: error: expected constructor,destructor or type conversion before '++' token
line:65: error: expected unqualified-id before 'return' line:66: error: expected declaration before '}' token
Have you some idea what's wrong?
Regards. bjduino@gmail.com
Fail copy in the script code, I fix that, check again with arduino ide 1.0.6
this time I compile it and works without errors.
Problem was in the line 50. Check that line.
Regards
Hi! Many thanks for helping me, i compile it in arduino 1.0.1 and 1.0.6 without any error.
Regards.
Have a nice day!
Hello, I’ve the pcb dishwasher down and i’ve find your arduino perfect program. I’m waiting the item to repair.
I need your help because I’ve a push button for program select and one button for delay start (3-6-9-12H). I’m newbie in arduino and C++ but after some days I tried some modifications.
Can it Work ? Thank you very much !!!
const int remiseAzero = 0;
int lastkeybtnState = 0;
int keybtnState = 0;
int keybtnCounter = 0;
int readKey(){
keybtnState = digitalRead(keySelect); // lis en fonction du nombre d’appui sur le bouton
if (keybtnState != lastkeybtnState) {
if (keybtnState == HIGH) {
keybtnCounter++;
}
lastkeybtnState = keybtnState;
}
if (keybtnCounter != 1) return btnRinse;
if (keybtnCounter != 2) return btnEconom;
if (keybtnCounter != 3) return btnNormal;
if (keybtnCounter != 4) return btnStrong;
if (keybtnCounter != 5) return btnFast;
if (keybtnCounter != 6) { keybtnCounter = remiseAzero; lastkeybtnState = remiseAzero; keybtnState = remiseAzero; }
}
you need a routine of when stop:
if(keybtnCounter !=1) return btnRinse;
if(keybtnCounter !=2) return btnEconom;
if we only take these 2 lines, when you press one time the button automatically go to btnRinse routine all the time, you won´t be able to select another routine. you need a one loop I think, and with press start button go out to the loop and compare with
if (keybtnCounter != 1) return btnRinse;
if (keybtnCounter != 2) return btnEconom;
if (keybtnCounter != 3) return btnNormal;
if (keybtnCounter != 4) return btnStrong;
if (keybtnCounter != 5) return btnFast;
Check this http://www.arduino.cc/en/Tutorial/ButtonStateChange
Boa tarde, é possivel meter aqui o esquema electrico para ver as ligaçoes??
Gracias
sorry i don’t have schematics
any wiring diagrams available as of yet?
Sorry I don’t have it yet.