Main Content

Common

Arduino Common blocks

Blocks

Analog InputMeasure voltage of analog input pin
Analog OutputGenerate voltage on the specified DAC pin
CAN Transmit Transmit message to CAN network (Since R2019b)
CAN Receive Receive message from CAN network (Since R2019b)
Continuous Servo WriteSet direction and speed of continuous rotation servo motor
Digital InputGet logical value of digital input pin
Digital OutputSet logical value of digital output pin
I2C WriteWrite data to an I2C peripheral device or an I2C peripheral device register
I2C ReadRead data from I2C peripheral device or I2C peripheral device register
SPI WriteReadWrite data to and read data from an SPI device
PWMGenerate pulse width modulated signal on analog output pin
Serial ReceiveReceive data over Arduino serial port
Serial TransmitTransmit data over Arduino serial port
Standard Servo ReadMeasure shaft position of standard servo motor in degrees
Standard Servo WriteSet shaft position of standard servo motor to angle specified in degrees
External InterruptTrigger the downstream function-call subsystem from an Interrupt Service Routine
SD Card File ReadRead data from an SD card (Since R2019b)
Input CaptureMeasure frequency and duty cycle of external input signal (Since R2020b)
Modbus RS485 Client ReadClient device reads data from server device register(s) over RS485 network (Since R2020b)
Modbus RS485 Client WriteClient device writes data to server device register(s) over RS485 network (Since R2020b)
Modbus RS485 Server ReadServer device reads data from the server device register over RS485 network (Since R2020b)
Modbus RS485 Server WriteServer device writes data to server device register over RS485 network (Since R2020b)
BLE SendSend data using Bluetooth Low Energy (BLE) protocol (Since R2021b)
BLE ReceiveReceive data using Bluetooth Low Energy (BLE) protocol (Since R2021b)
Protocol EncoderEncode input data into a uint8 byte stream by specifying the packet structure (Since R2021b)
Protocol DecoderDecode a uint8 byte stream by specifying the packet structure (Since R2021b)
L293D DC MotorControl power and direction of a DC motor (Since R2023a)
PCA9685 DC MotorControl power and direction of a DC motor (Since R2023a)
L293D DC MotorControl power and direction of a DC motor (Since R2023a)
PCA9685 DC MotorControl power and direction of a DC motor (Since R2023a)
NeoPixelControl color and brightness of RGB and RGBW Adafruit NeoPixel LED strip (Since R2024a)
On-board EEPROM ReadRead data from on-board Arduino EEPROM (Since R2024a)
On-board EEPROM WriteWrite data to on-board Arduino EEPROM (Since R2024a)

Topics

Tutorials