Go Down

Topic: How frequently is it okay to call Bridge.put() (Read 436 times) previous topic - next topic

timex40

I have a sketch that is pushing sensor values to the Linux side of the Yun using Bridge.put()

For example my loop function would include:


void loop() {
    value = analogRead(sensorPin);
    Bridge.put('Sensor_val', String(value));
}



My question is what is the minimum delay() that should be used in this loop?

Is there any problems with putting a delay(100) in there so that Bridge.put() is called 10x per second? Is there any problems with doing it faster than that?

dalver

You can do it without any delays - Bridge.put is blocking function which transfer your string code to OpenWRT by Serial1 with 250k speed.

Go Up