VMA326
V. 01 – 19/03/2018
4
©Velleman nv
// CODE BEGIN
int Led=13; // variable Led = connected to digital pin 13 (Which is on your VMA100 connected to a LED as
well)
int buttonpin=3; // Variable buttonpin = connected to digital line 3, this is where the VMA326 output has to
be connected for this test
int val;
void setup()
{ pinMode(Led,OUTPUT); // declare Led (digital 13) as output
pinMode(buttonpin,INPUT); // declare buttonpin (digital 3) as input
}
void loop()
{
val=digitalRead(buttonpin); // read the value of buttonpin (digital 3)
if(val==HIGH) // if this value is high ...
{ digitalWrite(Led,HIGH); } // then switch Led (digital 13) to High
else { digitalWrite(Led,LOW); } // else .. switch to low
}
// CODE END
8.
More Information
Please refer to the VMA326 product page on
Use this device with original accessories only. Velleman nv cannot be held responsible in the event
of damage or injury resulting from (incorrect) use of this device. For more info concerning this
product and the latest version of this manual, please visit our website www.velleman.eu. The
information in this manual is subject to change without prior notice.
© COPYRIGHT NOTICE
The copyright to this manual is owned by Velleman nv. All worldwide rights reserved.
No part of this
manual may be copied, reproduced, translated or reduced to any electronic medium or otherwise without the
prior written consent of the copyright holder.