int dianwei; int led = 13; void setup() { // put your setup code here, to run once: Serial.begin(9600); pinMode(led,OUTPUT); } void loop() { // put your main code here, to run repeatedly: dianwei = analogRead(A0); Serial.println(dianwei); digital
tone()函数 tone(pin, frequency) tone(pin, frequency, duration) # 参数 pin: the pin on which to generate the tone frequency: the frequency of the tone in hertz - unsigned int duration: the duration of the tone in milliseconds (optional) - unsigned long to