The board at a glance

The heart of the Arduino Uno R3 is the ATmega328P microcontroller, running at 16 MHz with 5 V logic. It has 32 KB of flash memory for your program (0.5 KB is taken by the bootloader), 2 KB of RAM and 1 KB of EEPROM to keep data when the power is off.

Quasar Basic uses the same microcontroller and the same pin layout, so shields, sketches and tutorials for the Uno work unchanged. In the Arduino IDE you simply choose Arduino Uno.

PinsWhat they do
D0–D13Digital input/output (D0 and D1 are the serial port)
D3, D5, D6, D9, D10, D11PWM output (marked with ~ on the board)
A0–A5Analog inputs, 10 bit (0–1023); usable as digital pins too
A4, A5I2C: SDA and SCL
D10–D13SPI: SS, MOSI, MISO, SCK
D2, D3External interrupts
5V, 3.3V, GND, VINPower

Power pins

  • 5V: the regulated 5 V supply, from USB or from the on-board regulator. You can use it to power sensors and small modules.
  • 3.3V: a small 3.3 V supply, about 50 mA at most. On Quasar Basic it comes from the FT232RL USB chip, so it is fine for a radio module or a sensor, not for motors or LED strips.
  • GND: ground. Every circuit you connect must share it with the board.
  • VIN: the input for an external supply; 7–12 V is the recommended range.
  • RESET: connecting it to GND restarts the program.

Digital pins

Each digital pin can be an output (HIGH = 5 V, LOW = 0 V) or an input that reads HIGH or LOW. You choose with pinMode() and use them with digitalWrite() and digitalRead().

  • INPUT_PULLUP turns on an internal resistor of about 20–50 kΩ to 5 V: you can connect a push button between the pin and GND with no extra resistor. Pressed reads LOW, released reads HIGH.
  • Pin 13 has the on-board LED: perfect for a first test.
  • D0 and D1 are the serial port connected to USB. If you use them for something else, uploads and the serial monitor may stop working. Leave them free when you can.

Current limits: a pin can safely supply or sink about 20 mA (40 mA is the absolute maximum), and the whole chip about 200 mA. An LED always needs a resistor (220–330 Ω); motors, relays and LED strips need a transistor or a driver.

PWM pins

Pins 3, 5, 6, 9, 10 and 11 can produce PWM: a square wave that switches very fast between 0 and 5 V. With analogWrite(pin, value) and a value from 0 to 255 you choose how much of the time the pin stays HIGH, so you can dim an LED or control the speed of a motor through a driver.

  • The PWM frequency is about 490 Hz, and about 980 Hz on pins 5 and 6.
  • The Servo library uses the timer of pins 9 and 10: while a servo is attached, PWM doesn't work on those two pins.
  • tone() uses the timer of pins 3 and 11, so PWM on those pins is disturbed while a tone is playing.

Analog inputs

Pins A0–A5 measure a voltage between 0 and 5 V and turn it into a number from 0 to 1023 with analogRead(). Each step is about 4.9 mV. A reading takes about 0.1 ms, so you can do thousands of them per second.

voltage = reading × 5 / 1023

Typical uses are potentiometers, light sensors (LDR), temperature sensors and joysticks. The analog pins also work as normal digital pins: A0 is digital pin 14, A5 is pin 19.

Communication pins

  • Serial (UART): D0 (RX) and D1 (TX), shared with USB. For a second serial device, such as a Bluetooth module, use SoftwareSerial on two other pins.
  • I2C: A4 (SDA) and A5 (SCL), for displays, sensors and clocks. Many devices can share the same two wires.
  • SPI: D10 (SS), D11 (MOSI), D12 (MISO) and D13 (SCK), for SD cards, radio modules and fast displays. The same signals are on the 6-pin ICSP header.
  • Interrupts: D2 and D3 can call a function the instant a signal changes, without waiting for loop().

Notes for Quasar Basic

Quasar Basic has pads for an nRF24L01 radio module that uses the SPI pins: CE on D9, CSN on D10, SCK on D13, MOSI on D11 and MISO on D12. If the module is soldered, keep those pins free for the radio. The Quasar web console uses D2 and D3 for an optional HC-05 Bluetooth module.

Try the pins from the browser

Open the Quasar web console with the board connected over USB: upload the console firmware in one click, then switch pins on and off, set a pin as input with pull-up, move a PWM slider and watch the analog inputs on a live plot. It's the quickest way to see everything in this guide in action, on Quasar Basic or on any Arduino Uno.

Frequently asked questions

Yes. A0–A5 work as digital pins 14–19 with pinMode, digitalWrite and digitalRead. Only the analog inputs can use analogRead.

About 20 mA safely, with 40 mA as the absolute maximum, and about 200 mA for the whole chip. Use a resistor for LEDs and a transistor or driver for motors and relays.

If your sketch uses the Servo library, it takes over the timer of pins 9 and 10, so analogWrite no longer works on them. Move the PWM output to pins 3, 5, 6 or 11.

Yes. It uses the same ATmega328P at 16 MHz and the Arduino Uno R3 pinout; in the Arduino IDE you choose Arduino Uno.