Difference between revisions of "Category:Arduino"

From ElectroDragon
Jump to: navigation, search
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Other Board Manager Link ==
+
 
 +
== Library ==
 +
* Arduino library list - http://www.arduinolibraries.info/
 +
* The official arduino library link: http://www.arduino.cc/en/Reference/Libraries
 +
 
 +
{| class="wikitable sortable"
 +
|-
 +
! Library !! Category !! Note
 +
|-
 +
| [https://github.com/shirriff/Arduino-IRremote IRremote] || Communication || -
 +
|-
 +
| [http://arduiniana.org/libraries/newsoftserial/ New Soft Serial] || Communication || included since from 1.0 IDE
 +
|-
 +
| [[:File:CC1101.zip|CC1101]] || Radio || -
 +
|-
 +
| [http://www.arduino.cc/playground/InterfacingWithHardware/Nrf24L01 Mirf] || Radio || -
 +
|-
 +
| [http://henningkarlsen.com/electronics/library.php?id=52 UTFT] || Display || -
 +
|-
 +
| [http://code.google.com/p/arduino-filelogger/ Arduino File Logger] || Data || -
 +
|-
 +
| [http://henningkarlsen.com/electronics/a_l_tinyfat.php TinyFat] || Data || only supports FAT16 small-capacity cards, such as 1G card
 +
|-
 +
| [[:File:SDuFAT.zip|SDuFAT]] || Data || -
 +
|-
 +
| AccelStepper || Motor Drive || -
 +
|-
 +
| [http://playground.arduino.cc/Main/SoftwareI2CLibrary Software IIC] || Bus || -
 +
|-
 +
| [http://playground.arduino.cc/Main/I2cScanner IIC scanner] || Bus || -
 +
|}
 +
== Coding ==
 +
=== Data Handler ===
 +
{| class="wikitable sortable"
 +
|-
 +
! Function !! Description !! Category
 +
|-
 +
| strncpy || copy string or char array to string or char array || String and Char
 +
|-
 +
| stringOne += 12345678 || add to string || String and Char
 +
|-
 +
|
 +
* char charBuf[50];
 +
* stringOne.toCharArray(charBuf, 50) 
 +
|| string to char array || String and Char
 +
|}
 +
 
 +
== Board Manager Links ==
 
Copy into preference, and install in board manager
 
Copy into preference, and install in board manager
 
* ESP8266 - http://arduino.esp8266.com/stable/package_esp8266com_index.json
 
* ESP8266 - http://arduino.esp8266.com/stable/package_esp8266com_index.json
 
* Digispark - http://digistump.com/package_digistump_index.json
 
* Digispark - http://digistump.com/package_digistump_index.json
 
* ESP32 - https://github.com/espressif/arduino-esp32
 
* ESP32 - https://github.com/espressif/arduino-esp32
 +
* Attinycore - http://drazzy.com/package_drazzy.com_index.json
 +
 +
== Firmware ==
 +
=== Use Arduino as ISP ===
 +
There is sketch in the arduino IDE, for the wiring in the description should be:<br />
 +
[[File:Avr-isp-test.png|thumbnail]]
 +
{| class="wikitable sortable"
 +
|-
 +
! pin name !! not-mega !! mega(1280 and 2560)
 +
|-
 +
| SS(Slave Reset) || 10 || 53
 +
|-
 +
| MOSI || 11 || 51
 +
|-
 +
| MISO || 12 || 50
 +
|-
 +
| SCK || 13|| 52
 +
|}
 +
upload the sketch and use Avrdude to test it, and should success on following picture<br />
 +
 +
 +
=== Burning bootloader ===
 +
* Tools you will need:
 +
* USBASP programmer: in our test, it's much faster than the USBtinyISP, don't know really know why, burning with usbasp only need 5-10 seconds, but usbtinyisp need around 1-2 minutes
 +
* ISP 10-6 Pins converter: It's really helpful to convert ISP 10 pins to ISP 6 pins, and also help you to remember the pins for ISP-6, because the silk print indicate it! Works for all the ISP-10 programmer.And Arduino only have 6-pin ISCP connector
 +
* Your arduino board: The MCU is already on the board and need to be programmed.
 +
* Connect the programmer with the converter like below, only need to remember MISO is always to PIN1:<br />
 +
* Connect the board with USBASP to your laptop and burn, no need USB connect to the board anymore
 +
<gallery>
 +
File:Burning_bootloader_kit.JPG
 +
File:MISO_pin1.JPG
 +
File:Burning_uno.JPG
 +
File:Burning_mega.JPG
 +
<gallery>
 +
 +
* You will get both error message when you burning uno and mege with usbasp programmer, but don't worry, it's just a "warning" message instead of "error" message, nothing is going wrong actually. (This is tested with Arduino IDE 1.0)<br />
 +
To verify the IC is successfully burnned, simply upload sketch from examples - basics - blink to see the Status LED 13 on the board should start to blink after upload sketch. (The status LED 13 should be only power ON for UNO and unusual blinking for MEGA but not smoothly blink after uploading bootloader)<br />
 +
 +
<gallery>
 +
File:Error_upload_message.png
 +
File:Error_upload_message_for_mega.png
 +
File:Uploading_sketch.JPG| upload sketch normallynow
 +
</gallery>
 +
 +
=== Burning bootloader with other programmer, directly via hex file ===
 +
==== Use Avrdudess programming ====
 +
You can find the avrdude we used here.[[programmer]]<br />
 +
<gallery widths =300px heights =300px>
 +
File:Flash pro mini.png
 +
File:arduinobootsetup.jpg
 +
File:Avrdudess_uno.jpeg | Flash use avrdudess GUI
 +
</gallery>
 +
 +
==== Fuse bit ====
 +
* Atmega328p UNO
 +
hfuse - 0xDE
 +
lfuse - 0xFF
 +
efuse - 0x05
 +
* Lock bit
 +
# BLB12 BLB11 - app to bootloader
 +
# BLB02 BLB01 - bootloader to app
 +
# LB2 LB1 - visit control to  Flash, EEPROM, Fuse (hfuse, lfuse, efuse) and Boot Lock Bit
 +
* bootloader area NOT visit-able - lfuse set to 0x0F
 +
* bootloader area visit-able - lfuse set to 0x3F
 +
=== Other type bootloader ===
 +
* [http://drazzy.com/package_drazzy.com_index.json https://github.com/SpenceKonde/ATTinyCore]
 +
* [https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json https://github.com/damellis/attiny]
 +
* [https://raw.githubusercontent.com/mikaelpatel/Cosa/master/package_cosa_index.json https://github.com/mikaelpatel/Cosa]
 +
* [http://www.leonardomiliani.com/repository/package_leonardomiliani.com_index.json https://github.com/leomil72/megax8]
 +
* [https://mcudude.github.io/MicroCore/package_MCUdude_MicroCore_index.json https://github.com/MCUdude/MicroCore]
 +
 
[[category:Topics]]
 
[[category:Topics]]

Latest revision as of 16:28, 25 September 2017

Library

Library Category Note
IRremote Communication -
New Soft Serial Communication included since from 1.0 IDE
CC1101 Radio -
Mirf Radio -
UTFT Display -
Arduino File Logger Data -
TinyFat Data only supports FAT16 small-capacity cards, such as 1G card
SDuFAT Data -
AccelStepper Motor Drive -
Software IIC Bus -
IIC scanner Bus -

Coding

Data Handler

Function Description Category
strncpy copy string or char array to string or char array String and Char
stringOne += 12345678 add to string String and Char
  • char charBuf[50];
  • stringOne.toCharArray(charBuf, 50)
string to char array String and Char

Board Manager Links

Copy into preference, and install in board manager

Firmware

Use Arduino as ISP

There is sketch in the arduino IDE, for the wiring in the description should be:

Avr-isp-test.png
pin name not-mega mega(1280 and 2560)
SS(Slave Reset) 10 53
MOSI 11 51
MISO 12 50
SCK 13 52

upload the sketch and use Avrdude to test it, and should success on following picture


Burning bootloader

  • Tools you will need:
  • USBASP programmer: in our test, it's much faster than the USBtinyISP, don't know really know why, burning with usbasp only need 5-10 seconds, but usbtinyisp need around 1-2 minutes
  • ISP 10-6 Pins converter: It's really helpful to convert ISP 10 pins to ISP 6 pins, and also help you to remember the pins for ISP-6, because the silk print indicate it! Works for all the ISP-10 programmer.And Arduino only have 6-pin ISCP connector
  • Your arduino board: The MCU is already on the board and need to be programmed.
  • Connect the programmer with the converter like below, only need to remember MISO is always to PIN1:
  • Connect the board with USBASP to your laptop and burn, no need USB connect to the board anymore

Burning bootloader with other programmer, directly via hex file

Use Avrdudess programming

You can find the avrdude we used here.programmer

Fuse bit

  • Atmega328p UNO
hfuse - 0xDE
lfuse - 0xFF
efuse - 0x05
  • Lock bit
  1. BLB12 BLB11 - app to bootloader
  2. BLB02 BLB01 - bootloader to app
  3. LB2 LB1 - visit control to Flash, EEPROM, Fuse (hfuse, lfuse, efuse) and Boot Lock Bit
  • bootloader area NOT visit-able - lfuse set to 0x0F
  • bootloader area visit-able - lfuse set to 0x3F

Other type bootloader

Subcategories

This category has only the following subcategory.

Pages in category "Arduino"

The following 2 pages are in this category, out of 2 total.