Stap 3: Test code
#include
int pre_pin = 0; int pre_data = 0; int led_pin = 1; void setup () {printf ("Begin test sensing druk! \n"); pinMode (pre_pin, INPUT);}
void loop () {pre_data = analogRead (pre_pin); als (pre_data > = 58) {digitalWrite (led_pin, hoge); printf ("leidde op! \n");} anders {digitalWrite (led_pin, laag); printf ("opende! \n");}}