ADC Community_02 (Automationdirect.com) asked a question.
When posting code into a forum post we are requesting that you format like the example below to provide guidance and set format to promote consistency:
Purpose: Describe the purpose, scope and/or goal of what your code is achieving.
Example:
Turns an LED on for one second, then off for one second, repeatedly.
Dependencies: List any required dependencies or libraries invokes another object's functionality in order to accomplish some specific task.
Example:
https://github.com/arduino-libraries/ArduinoModbus
https://github.com/arduino-libraries/ArduinoRS485
Code: Ensure you use the code snippet optionunder the advanced editor when placing your code into the post. ( You may also want to include a text file of your code since this forum will not preserve formatting options when pasting into a code block.)
Example:
- /*
- Blink
-
- Turns an LED on for one second, then off for one second, repeatedly.
-
- */
-
- // the setup function runs once when you press reset or power the board
- void setup() {
- // initialize digital pin LED_BUILTIN as an output.
- pinMode(LED_BUILTIN, OUTPUT);
- }
-
- // the loop function runs over and over again forever
- void loop() {
- digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
- delay(1000); // wait for a second
- digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
- delay(1000); // wait for a second
- }
Code Block Formatting