// led_blink_sample1 const int led_pin = 13; // LED connected to digital pin 13 int sensorPin =A0 ; int value = 0; void setup() { pinMode(led_pin, OUTPUT ); // sets the digital pin as output Serial.begin(9600); } void loop() { if (0){ value = analogRead(sensorPin); Serial.println(value, DEC);//シリアルモニター用 }else{ value = analogRead(sensorPin)/8.;//8ビットに落とすため4で割る Serial.write(value);//processing用 } digitalWrite(led_pin, HIGH ); // sets the LED off delay( 100 ); // waits for a second digitalWrite( led_pin, LOW ); // sets the LED on delay( 100 ); // waits for a second }