Arduino sends the value of a potentiometer over Bluetooth.
// Juan A. Villalpando
// http://kio4.com/appinventor/299H_extension_GraficoDinamico.htm
int value_pot0;
void setup() {
Serial.begin(9600);
}
void loop() {
value_pot0 = analogRead(A0);
// value_pot0 = (int) random(0,1023);
Serial.println(value_pot0);
delay(100); // It should be slower than the Clock Interval.
}
Great job Juan Antonio !!!
To do the same I was using a canvas split in two sections (a left one , mirroring the right one) but the effect was not continuous like yours (i.e. such as a scrolling track on an oscilloscope). Thanks a lot: this will be a big improvement in my "digital HUD" for my old convertible.
Cheers, Ugo.
Amazing job @Juan_Antonio!
I have implemented similar moving real-time graphs using the timers and recursive draw functions, but this extension would make the process so easier!
Hello dear ,
I want to stop the shifting at a certain point .. how to freeze it ? Like my Arduino sensor is sending bell shape once it hits back the zero Y I want to stop it ? I see we have two options , either one screen … no shift or keep going shift left forever … how can I stop the graph as is at a certain point ? … thank you so much for your help
thank you so much .. working like a charm ! ... now i have full control of it except i am missing the following:
1- my horizontal x line can be 2 min or 2 hours ... if i need both cases to be in ONE screen .. how can i change X scale according? (before i start plotting i do not know in advance if it will be 2 min or 50 min or 2 h ..) ... can i zoom in out ? like using two fingers to change x scale ?
2- lets say case one above is not possible and my x for one screen wide of my cell is 10 staps while my graph is 30 steps ( like 3 screens wide) once graph done .. can i scroll right - left to see the whole graph in the 3 screen width?
btw i tried changing the kio4 dynamicgraph.resolution > to Slider1.thumbposition which works fine with NEW upcoming data to be plotted, not the previously plotted data.
thank you
google chart means my cell must be connected to internet right ? .. i mean if i need it to plot the graph offline (i am using bleutooth to arduino) .. can i save the google js file at the arduino then that file will generate the grapf without need of uploading it to google chart live?.. possible?
thank you