Önerinizi deneyeceğim."switch" satırını komple silebilirsiniz. Bir işe yaramıyor.
Bence "C" öğrenmeye devam edin.?
int vericikodu;
#include <RCSwitch.h>
#include <Wire.h>
#include <TM1637Display.h>
#define CLK 7
#define DIO 6
#define TEST_DELAY 1000
int counter = 0;
TM1637Display display(CLK, DIO);
RCSwitch mySwitch = RCSwitch();
void setup() {
Serial.begin(9600);
display.setBrightness(0x02);
}
void loop()
{
mySwitch.enableReceive(0);
display.showNumberDec(counter, false);
counter++;
if (mySwitch.available()) {
unsigned long int num = mySwitch.getReceivedValue();
Serial.println("vericikodu;" + String(num)); switch (num)
{
case 7201636: mySwitch.disableReceive(); ??????????????????;
case 15198372: mySwitch.disableReceive(); ???????????????;
case 12804004: mySwitch.disableReceive(); ????????????????;
}
mySwitch.resetAvailable();
mySwitch.enableReceive(0);
}}
#include <RCSwitch.h>
#include <Wire.h>
#include <TM1637Display.h>
#define CLK 7
#define DIO 6
#define TEST_DELAY 1000
int counter = 0;
int vericikodu;
unsigned long int num;
TM1637Display display(CLK, DIO);
RCSwitch mySwitch = RCSwitch();
void setup()
{
Serial.begin(9600);
display.setBrightness(0x02);
}
void loop()
{
mySwitch.enableReceive(0);
//display.showNumberDec(counter, false);
//counter++;
if (mySwitch.available())
{
num = mySwitch.getReceivedValue();
Serial.println("vericikodu;" + String(num));
switch (num)
{
case 7201636:
mySwitch.disableReceive(); //??????????????????;
display.showNumberDec(1, false);
break;
case 15198372:
mySwitch.disableReceive(); //???????????????;
display.showNumberDec(2, false);
break;
case 12804004:
mySwitch.disableReceive(); //????????????????;
display.showNumberDec(3, false);
break;
default:
break;
}
mySwitch.resetAvailable();
mySwitch.enableReceive(0);
}
}
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?