I made the changes and started receiving a similar error (photo attached, blurry and dark as it is refreshing similar to the last error, 250 stayed the same and nothing was appearing in second bracket).
Been working on this since yesterday with no luck still. I was reading this piece from the FAQs, and tried a similar approach and attempted implementing the Bluetooth into it, with no luck and a similar error the one I had in my previous error. Except with nothing in the first set of brackets and a 0 in the second.
Returning to my original blocks, I removed the edits I made to the previous post I did as I realised it was wrong. Here is where I am at so far; I am not receiving an error, just nothing is appearing on the graph.
Edit: Further reading took me to this edit of the piece from the FAQs. Attempting to modify it has given me an error which I believe is due to the fact the the app I download is not the updated version that I have done, as the error says the MAC address is incorrect. As I am deleting the blocks that contain the MAC address, I cant find why it would say that.
Still no closer in my own app to getting something graphed.
Ahh I see. Yes the graphing works. But I can't figure out how to graph what is being received via Bluetooth instead. I see you have added the 'to process Y' block but I can't find out how to add that to my own as it doesn't show in my own Procedures block section.
Edit: And I see the extra Y_before_increment to get Y after the canvas draw bit, but not sure why that's there too. I added it with no difference to outcome. So the only difference I can see is that there's something with the fact that it doesn't recognise the received data as graphable but the data inputted manually can be? I'm very confused haha
It's like when you open up some electronics and see extra pins and connectors on the circuit board, to give the repair technician (do they still exist?) a place where they can test voltages or inject signals, to see which parts of the board are working and which are not working.
This is a special case of the more general debugging technique called Divide and Conquer, where you try to divide a complex problem into smaller, simpler problems.
Here; I added the process procedure to separate two different questions:
Is the Bluetooth part receiving data at all?
Is the graphing part capable of receiving successive Y values and graphing them?
Once we are satisfied with the process procedure, we can make the Horizontal Arrangement holding that text box and Enter button inVisible, so they are there in case we might need them later.
Ahh OK I'm following. I'm aware of Divide and Conquer and just couldn't figure a way of reducing this problem down. So the graph can be plotted as it is definitely receiving data via Bluetooth. But when trying to plot said data it does not. Struggling to figure out why.
I've had some time away from this project, I'll return soon but I forgot to bring the device on my trip so I'll have to wait a little longer then I had hoped.
thank you so much. I followed this revised for my set up and graph run in real time.
But I dont understand well why Canvas1.height - global Y because I searched canvas coordinate system in MIT and compared. I am confused that step.
int in = A0;
Arduino code
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(in, INPUT);
}
void loop() {
//put your main code here, to run repeatedly:
float val = analogRead(in);
float val2 = val / 205*100;
Serial.println(val2);