Value readings from a digital sensor on the ATtiny412
Hi all. I'm using a board with an ATtiny412 to which I connect a digital Doppler Radar RCWL-0516 sensor and I want it to send me the values by Serial (0 and 1). I compile the program in Arduino and upload it through UPDI using python (Linux). I open the terminal to read the Serial and nothing arrives. I've tried Neil's Echo program and it doesn't send me the Hello World! Message either. This board is used in Networking with a Phototransistor sensor and it sends me values through the Serial. It may be that you have to enable some function in the programming to say that the Serial is for an analog or digital sensor.
I use pins 4 (TX), 5 (RX), and pin 7 to connect the sensor input. The program code is as follows.
*const int RadarPin = 4; void setup() { Serial.begin(115200); pinMode(RadarPin, INPUT); } void loop() { int value= digitalRead(RadarPin); Serial.println(value);
}*