Sunday, January 31, 2021

CIRCUITPYTHON :SEEEDUINO XIAO [SEED]

 CIRCUITPYTHON :SEEEDUINO XIAO

Steps:

 Uses SAMD21 Processor

1. connect SEEEDuino xiao to PC using TYPE-C cable
2. short RST pins using a cable fast , 2 times.
3. Once done successfully,Audrino drives appears
4. Go website -

https://circuitpython.org/board/seeeduino_xiao/

https://wiki.seeedstudio.com/Seeeduino-XIAO-CircuitPython/

5. Download latest .UF2 file
6. Copy and paste it inside the drive
7. Now the drive will be converted to CIRCUITPY
8. Create a file code.py
9. Copy paste below code into code.py (same for all circuit py IC)

import time
import board
from digitalio import DigitalInOut,Direction


led = DigitalInOut(board.D13) #D13 is a built in LED

#A1 - A10 can be used as well if u use a separate LED and a Resistor 100 - 400 ohms refer below for calculations
led.direction=tinker .OUTPUT

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

   


 

 

10. Save file
11. The LED should start blinking


A simple LED circuit consists of a LED and resistor. The resistor is used to limit the current that is being drawn and is called a current limiting resistor. Without the resistor the LED would run at too high of a voltage, resulting in too much current being drawn which in turn would instantly burn the LED, and likely also the GPIO port.

To calculate the resistor value we need to examine the specifications of the LED. Specifically we need to find the forward voltage (VF) and the forward current (IF). 

A regular red LED has a 

forward voltage (VF) of 1.7V 

 forward current of 20mA (IF). 

output voltage of the IC which is 3.3V.

We can then calculate the resistor needed-


RΩ=VI=3.3VFIF=3.31.720mA=80Ω




VI=3.3=3.31.7

No comments:

Post a Comment