KEY TAKE AWAY POINTS:
Typically just 2 values
In programming, usually as integer 1/0
On physical circuit, usually as voltage HIGH (3V) / LOW(GND)
Outputting a digital signal "digital write pin [ ] to (0/1)"
Inputting a digital signal "digital read pin [ ]"
Never leave a digital PIN floating, undefined digital input/output pin ends as random result
START A BIT > Knowledge Base > This page
Snapshot from Dictionary boxes on Google
In electronics, a signal is carried by electromagnetic or electrical current, often represented by a time-varying Voltage that is carrying information.
2 types of signals: Analog and Digital signals.
Represents continuous values. At any given time it represents a value within a continuous range. Produce a smooth and continuous curve, no discrete value changes.
Often used to represent changes in natural light, sound, temperature, position, pressure, or other physical phenomena.
Represents data as a sequence of discrete values. At any given time it can only take on at the most one of a finite number of values.
Used in all digital electronics, including computing equipment and data transmission devices. Typical case in computer is simply only 2 values.
For Digital Signaling, there must be a clear answer from the 2 values! Unspecified answer means uncertain random result, which creates troubles!
Programming
Integer number 1/0
Physics
Voltage HIGH/LOW
"digital read pin [ ]" reads in the input from pin (voltage), which must be safely managed. Idle input from pin (voltage) is floating, unless it's explicitly pulled up/down.
Use software to activate built-in pull up/down resistor, not always available.
Pull it up/down by a pulling-resistor wired externally.
Digital input often has "bouncing issue", keep in mind about the non-ideal physical phenomenon, de-bounce the jitter as needed.
Before any "digital write pin [ ] to (0/1)", the initial output to pin (voltage) is floating!
It's good practice to always initialize the starting state on start.
After a "digital write pin [ ] to (0/1)", the resulted output to pin (voltage) persists, unless changed by another new command