() -> pinState
() -> pinState
() -> mode
() -> mode
() -> mode
Writes a string to the serial output.
(string) -> unit
str : string | The string to write |
unit
Writes a character list to the serial output.
(list<uint8,n>) -> unit
cl : list<uint8,n> | The character list to print |
unit
Writes a float to the serial output.
(float) -> unit
f : float | The number to write |
unit
Writes an integer to the serial output.
(int32) -> unit
n : int32 | The number to write |
unit
() -> base
() -> base
() -> base
() -> base
Converts a base to the numerical integer base it represents.
(base) -> t where t : int
b : base | The base value |
Returns 2 in the case of binary, 8 for octal, 10 for decimal and 16 for hexadecimal
Writes an integer in the given base to the serial output.
(int32, base) -> unit
n : int32 | The number to write |
b : base | The base to use |
unit
Writes a float with the given number of decimal places to the serial output.
(float, int32) -> unit
f : float | The number to write |
numPlaces : int32 | The number of decimal places to use |
unit
Sets up serial ouput
(uint32) -> unit
speed : uint32 | Sets the data rate in bits per second (baud) for serial data transmission. |
Unit
Writes a value directly to a pin.
(uint16, pinState) -> unit
pin : uint16 | The pin to write to. |
value : pinState | The state the pin should be in. |
Unit
See also: digOut
Reads a value direction from a pin.
(uint16) -> pinState
pin : uint16 | The pin to read from. |
The value of the pin.
See also: digIn
Creates an input signal given some pin identifier.
(uint16) -> sig<pinState>
pin : uint16 | The pin to read from |
A signal holding the state of the pin.
See also: digRead
Takes in an input signal && writes the value contained in the signal to the given pin.
(uint16, sig<pinState>) -> unit
pin : uint16 | The pin to write to |
sig : sig<pinState> | The signal to output to the pin |
Unit
See also: digWrite
Reads a value directly from an analog pin.
(uint16) -> uint16
pin : uint16 | The pin to read from |
A value ranging from 0 to 1023.
See also: anaIn https://www.arduino.cc/en/Reference/AnalogRead
Writes an analog (PWM) value directly to an analog pin.
(uint16, uint8) -> unit
pin : uint16 | The pin to write to |
value: uint8 | The analog value to write to the pin. This number ranges from 0 (always off) to 255 (always on) |
See also: anaOut https://www.arduino.cc/en/Reference/AnalogWrite
Creates an analog input signal given some pin identifier.
(uint16) -> sig<uint16>
pin : uint16 | The pin to read from |
See also: anaRead
Takes in an analog input signal and writes the value contained in the signal to the given analog pin.
(uint16, sig<uint8>) -> unit
pin : uint16 | The pin to write to |
sig : sig<uint8> | The analog signal to output to a pin |
Unit
Converts a pinMode to an integer representation.
(mode) -> uint8
m : mode | The mode to convert |
0 for input, 1 for output and 2 for inputPullup
Converts an integer representation to a pinMode
(uint8) -> mode
m : uint8 - The mode to convert
input for 0, output for 1 and inputPullup for 2
Takes in a signal and a previous state and outputs a new signal that fires when the input signal transitions from low to high.
(inout pinState, sig<pinState>) -> sig<unit>
prevState : inout pinState | Holds the previous state of the signal |
sig : sig<pinState> | The digital input signal |
A signal of type unit. The signal fires unit on a rising edge, otherwise it does not fire.
Takes in a signal and a previous state and outputs a new signal that fires when the input signal transitions from high to low.
(inout pinState, sig<pinState>) -> sig<unit>
prevState : inout pinState | Holds the previous state of the signal |
sig : sig<pinState> | The digital input signal |
A signal of type unit. The signal fires unit on a falling edge, otherwise it does not fire.
Takes in a signal and a previous state and outputs a new signal that fires when the input transitions from high to low or low to high
(inout pinState, sig<pinState>) -> sig<pinState>
prevState : inout pinState | Holds the previous state of the signal |
sig : sig<pinState> | The digital input signal |
A signal that outputs high on a rising edge and low on a falling edge.