Question: Complete the function loop() so that it keeps track of both the current and previous PIN 13 reads. Modify the code so it prints both
Complete the function loop() so that it keeps track of both the current and previous PIN 13 reads. Modify the code so it prints both previous and current values, for example for reads 1,2,3,4,5, it prints pairs of previous, current values. WILL KEEP THIS void loop; void print (int x) { printf("%d". x); } void print (string s) { printf("%s". s.c_str():) void println(int x) { printf("%d ", x):) void printin(strings) { printf("%s ", 8.c_str(); } vector cints reads; int ren; int analogRead(int pin) { return reads [ren++]: ) void lookback (vector
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
