Robotic Motor Controller - What is digitalWrite() in arduino ?
What is digitalWrite() in arduino ?
- The main objective of digitalwrite function in arduino is to write a HIGH or a LOW value to the defined port on the robot. the ports are exposed on the robot as Tinker Kit connectors.
- It does not return any value while connecting in arduino.
- The importing point to be noticed is that analog input pins can be used as digital pins, referred to as A0, A1, etc.
- Additionally the capitalization of the W in digitalWrite and HIGH/LOW is mandatory
- In Arduino Uno/Nano microcontroller, - HIGH is equivalent to 5V, while - LOW is equivalent to 0V.
Digital write in arduino
Syntax
Example:
delay();
- The delay function pauses the program for the amount of time (in milliseconds).
- The important to be noticed in delay() is that is not in seconds it was in milliseconds