Error: bad Arguments to DrawLine

Hi everyone, i'm building a earthquake detector and the data will be sent to companion app to be graphed, time against vibration. However, there seem to be an error. How could I correct the code?

Arduino code

int Vibration_signal = 13; //Define the Digital Input on the Arduino for the sensor signal

void setup() {
  pinMode(Vibration_signal, INPUT);
void loop() {
long data = pulseIn(Vibration_signal,HIGH);


blocks (6)
blocks (5)
blocks (4)


First use this block:

Then change these blocks:

on this:

1 Like

I don't see any place where you normalize y to fit it into the range 1 ... Canvas.Height

P.S. AI2 has a graph component that can receive Bluetooth text and graph it automatically.

1 Like