Пн окт 01, 2018 16:22:11
const int analogOutPin = A0;
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
int i;
for (i=0; i<1024; ++i)
analogWrite (analogOutPin, i);
for (i=1023; i>0; --i)
analogWrite (analogOutPin, i);
}
const int analogOutPin = A0;
const int analogInPin = A1;
void setup() {
pinMode (analogOutPin, OUTPUT);
pinMode (analogInPin, INPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
int i, j;
for (i=0; i<1024; ++i)
{
analogWrite (analogOutPin, i);
delay (100);
j = analogRead (analogInPin);
if (i != j)
{
Serial.print("OutLevel = ");
Serial.print(i);
Serial.print("\t InLevel = ");
Serial.println(j);
}
}
while (1==1) {}
}
OutLevel = 120 InLevel = 0
OutLevel = 121 InLevel = 0
OutLevel = 122 InLevel = 0
OutLevel = 123 InLevel = 0
OutLevel = 124 InLevel = 0
OutLevel = 125 InLevel = 0
OutLevel = 126 InLevel = 0
OutLevel = 127 InLevel = 0
OutLevel = 128 InLevel = 1023
OutLevel = 129 InLevel = 1023
OutLevel = 130 InLevel = 1023
OutLevel = 131 InLevel = 1022
OutLevel = 132 InLevel = 1023
OutLevel = 133 InLevel = 1023
OutLevel = 134 InLevel = 1023
OutLevel = 135 InLevel = 1023
OutLevel = 136 InLevel = 1023
Пн окт 01, 2018 16:31:43
Пн окт 01, 2018 17:05:50
Пн окт 01, 2018 19:13:19
Пн окт 01, 2018 19:47:14
Пн окт 01, 2018 20:19:44
Ср окт 10, 2018 15:37:23
Ср окт 10, 2018 22:13:14