The most common programming languages used with Arduino are C and C++. Other languages that can be used with Arduino include Python, Java, Processing, and MATLAB.

Example of C:

int led = 13;
void setup()
{
pinMode(led, OUTPUT);
}
void loop()
{
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}

Example of Python:

import time
import board
import digitalio

led = digitalio.DigitalInOut(board.D13)
led.direction = digitalio.Direction.OUTPUT

while True:
led.value = True
time.sleep(1)
led.value = False
time.sleep(1)

Leave a Reply

Your email address will not be published. Required fields are marked *