ArrayArrayArray BrainModular BrainModular Users Forum 2016-02-04T11:33:59+02:00 https://brainmodular.org/forums/app.php/feed/topic/5290 2016-02-04T11:33:59+02:00 2016-02-04T11:33:59+02:00 https://brainmodular.org/forums/viewtopic.php?t=5290&p=34638#p34638 <![CDATA[usine with arduino]]>
Olivar

Statistics: Posted by oli_lab — 04 Feb 2016, 10:33


]]>
2016-02-03T08:30:58+02:00 2016-02-03T08:30:58+02:00 https://brainmodular.org/forums/viewtopic.php?t=5290&p=34626#p34626 <![CDATA[usine with arduino]]> You can use the fonction "map" to split the analog inputs.

CODE:

void loop&#40;&#41; &#123;  // read the input on analog pin 0&#58;  int sensor1Value = analogRead&#40;A0&#41;;  // print out the value you read&#58;  Serial.println&#40;sensor1Value&#41;;  delay&#40;10&#41;;        // delay in between reads for stability      // read the input on analog pin 1&#58;  int sensor2Value = analogRead&#40;A1&#41;;  // transform values from 0-1023 to 2000-3023   sensor2Value = map&#40;sensor2Value, 0, 1023, 2000, 3023&#41;;  // print out the value you read&#58;  Serial.println&#40;sensor2Value&#41;;  delay&#40;10&#41;;        // delay in between reads for stability        // read the input on analog pin 2&#58;  int sensor3Value = analogRead&#40;A2&#41;;  sensor3Value = map&#40;sensor3Value, 0, 1023, 4000, 5023&#41;;  // print out the value you read&#58;  Serial.println&#40;sensor3Value&#41;;  delay&#40;10&#41;;        // delay in between reads for stability
then in Usine, all datas between 0-1023 are coming from A0, datas between 2000-3023 are coming from A1, etc.
SB

Statistics: Posted by rlgsbt — 03 Feb 2016, 07:30


]]>
2016-02-02T18:19:55+02:00 2016-02-02T18:19:55+02:00 https://brainmodular.org/forums/viewtopic.php?t=5290&p=34620#p34620 <![CDATA[usine with arduino]]> I need to build a little basic trigger with 8 possibilities (buttons or knob) that could be hide on a wardrobe.
I think to make in with arduino. I manage to find a code (on the wiki page) to receive one value with the serial module in usine.
But it seems to me more complex if i'd like to receive several values on the same time.
Any experience ?
Thanks
JF

Statistics: Posted by joffo78 — 02 Feb 2016, 17:19


]]>
BrainModular BrainModular Users Forum 2016-02-04T11:33:59+02:00 https://brainmodular.org/forums/app.php/feed/topic/5290 2016-02-04T11:33:59+02:00 2016-02-04T11:33:59+02:00 https://brainmodular.org/forums/viewtopic.php?t=5290&p=34638#p34638 <![CDATA[usine with arduino]]>
Olivar

Statistics: Posted by oli_lab — 04 Feb 2016, 10:33


]]>
2016-02-03T08:30:58+02:00 2016-02-03T08:30:58+02:00 https://brainmodular.org/forums/viewtopic.php?t=5290&p=34626#p34626 <![CDATA[usine with arduino]]> You can use the fonction "map" to split the analog inputs.

CODE:

void loop&#40;&#41; &#123;  // read the input on analog pin 0&#58;  int sensor1Value = analogRead&#40;A0&#41;;  // print out the value you read&#58;  Serial.println&#40;sensor1Value&#41;;  delay&#40;10&#41;;        // delay in between reads for stability      // read the input on analog pin 1&#58;  int sensor2Value = analogRead&#40;A1&#41;;  // transform values from 0-1023 to 2000-3023   sensor2Value = map&#40;sensor2Value, 0, 1023, 2000, 3023&#41;;  // print out the value you read&#58;  Serial.println&#40;sensor2Value&#41;;  delay&#40;10&#41;;        // delay in between reads for stability        // read the input on analog pin 2&#58;  int sensor3Value = analogRead&#40;A2&#41;;  sensor3Value = map&#40;sensor3Value, 0, 1023, 4000, 5023&#41;;  // print out the value you read&#58;  Serial.println&#40;sensor3Value&#41;;  delay&#40;10&#41;;        // delay in between reads for stability
then in Usine, all datas between 0-1023 are coming from A0, datas between 2000-3023 are coming from A1, etc.
SB

Statistics: Posted by rlgsbt — 03 Feb 2016, 07:30


]]>
2016-02-02T18:19:55+02:00 2016-02-02T18:19:55+02:00 https://brainmodular.org/forums/viewtopic.php?t=5290&p=34620#p34620 <![CDATA[usine with arduino]]> I need to build a little basic trigger with 8 possibilities (buttons or knob) that could be hide on a wardrobe.
I think to make in with arduino. I manage to find a code (on the wiki page) to receive one value with the serial module in usine.
But it seems to me more complex if i'd like to receive several values on the same time.
Any experience ?
Thanks
JF

Statistics: Posted by joffo78 — 02 Feb 2016, 17:19


]]>