diff --git a/content/hardware/07.opta/family.md b/content/hardware/07.opta/family.md new file mode 100644 index 0000000000..4e26248386 --- /dev/null +++ b/content/hardware/07.opta/family.md @@ -0,0 +1,4 @@ +--- +title: Opta +description: A secure, easy-to-use micro PLC with Industrial IoT capabilities. +--- \ No newline at end of file diff --git a/content/hardware/07.opta/image-480.png b/content/hardware/07.opta/image-480.png new file mode 100644 index 0000000000..d18268f8e5 Binary files /dev/null and b/content/hardware/07.opta/image-480.png differ diff --git a/content/hardware/07.opta/image.png b/content/hardware/07.opta/image.png new file mode 100644 index 0000000000..a524b7b408 Binary files /dev/null and b/content/hardware/07.opta/image.png differ diff --git a/content/hardware/07.opta/opta-family/category.md b/content/hardware/07.opta/opta-family/category.md new file mode 100644 index 0000000000..f820de39ac --- /dev/null +++ b/content/hardware/07.opta/opta-family/category.md @@ -0,0 +1,3 @@ +--- +title: Opta Family +--- \ No newline at end of file diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/compatibility.yml b/content/hardware/07.opta/opta-family/opta/compatibility.yml similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/compatibility.yml rename to content/hardware/07.opta/opta-family/opta/compatibility.yml diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/datasheet/assets/featured.png b/content/hardware/07.opta/opta-family/opta/datasheet/assets/featured.png similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/datasheet/assets/featured.png rename to content/hardware/07.opta/opta-family/opta/datasheet/assets/featured.png diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/datasheet/assets/opta_mechanical.svg b/content/hardware/07.opta/opta-family/opta/datasheet/assets/opta_mechanical.svg similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/datasheet/assets/opta_mechanical.svg rename to content/hardware/07.opta/opta-family/opta/datasheet/assets/opta_mechanical.svg diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/datasheet/assets/opta_panel.svg b/content/hardware/07.opta/opta-family/opta/datasheet/assets/opta_panel.svg similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/datasheet/assets/opta_panel.svg rename to content/hardware/07.opta/opta-family/opta/datasheet/assets/opta_panel.svg diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/datasheet/assets/opta_wiring_modbus.svg b/content/hardware/07.opta/opta-family/opta/datasheet/assets/opta_wiring_modbus.svg similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/datasheet/assets/opta_wiring_modbus.svg rename to content/hardware/07.opta/opta-family/opta/datasheet/assets/opta_wiring_modbus.svg diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/datasheet/datasheet.md b/content/hardware/07.opta/opta-family/opta/datasheet/datasheet.md similarity index 98% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/datasheet/datasheet.md rename to content/hardware/07.opta/opta-family/opta/datasheet/datasheet.md index d90f6c889d..02a6087d76 100644 --- a/content/hardware/05.pro-solutions/solutions-and-kits/opta/datasheet/datasheet.md +++ b/content/hardware/07.opta/opta-family/opta/datasheet/datasheet.md @@ -1,738 +1,738 @@ ---- -identifier: AFX00001-AFX00002-AFX00003 -title: Arduino Opta® -type: pro -variant: 'Collective Datasheet' -author: Ali Jahangiri, Julián Caro Linares ---- -![](assets/featured.png) - -# Description -Arduino Opta® is a secure, easy-to-use micro PLC with Industrial IoT capabilities. Designed in partnership with leading relay manufacturer Finder®, it allows professionals to scale up industrial and building automation projects while taking advantage of the Arduino ecosystem. - -The Arduino Opta® family has three variants: the Arduino Opta® Lite, Arduino Opta® RS485, and Arduino Opta® WiFi, all of them documented inside this document. - - -# Target Areas: -Industrial IoT, Building automation, Electrical loads management, Industrial automation - - -# CONTENTS -## Product Variants -There are three variants of the Arduino Opta® created to fit the different needs of each industry and application. The difference between each of the variants can be found in the following table: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameArduino Opta® LiteArduino Opta® RS485Arduino Opta® WiFi
SKUAFX00003AFX00001AFX00002
USB -

USB-C®

-
-

USB-C®

-
-

USB-C®

-
Ethernet Support10/100BASE-T Port10/100BASE-T Port10/100BASE-T Port
RS-485N/AHalf-duplexHalf-duplex
Wi-Fi®N/AN/A802.11 b/g/n
Bluetooth®N/AN/ABluetooth® Low Energy
- -## Application Examples -Arduino Opta® is designed for industrial standard machinery control as a PLC with advanced features such as AI and connectivity capabilities. It is readily integrated into the Arduino hardware and software ecosystem, including real-time monitoring via the Arduino IoT Cloud. - - -- **Conveyor belt management:** Arduino Opta® offers the possibility to configure its inputs as digital or analog to flexibly collect data from several types of sensors. Thanks to the Wi-Fi®/Bluetooth® Low Energy connectivity, Arduino Opta® can also be smoothly integrated with sensing boards, like the Nicla® ones from the Arduino ecosystem, leveraging Arduino Opta's potential with vision, sound, weight detection, air quality measurement and many other capabilities. - - Arduino Opta® can use the data from the various sensors as they are or, thanks to its powerful microcontroller, use the outcome from a computation, to operate a wide variety of industrial machinery through its high-performing relays. - - All these features, wrapped in a compact form factor, make Arduino Opta® the ideal solution for product flow management in conveyor belts, automated packing or bottling lines. - -- **Real-time industrial monitoring:** Get instant access to your factory floor data and to the insights of your industrial processes to leverage your manufacturing excellence to continuous improvement. Implement visual management and KPIs monitoring thanks to the Arduino Opta's built-in connectivity features (Ethernet on all the product variants, Fieldbus and WiFi®/Bluetooth® Low Energy upon choice), delivering in a simple, fast and reliable way the data collected through beautiful dashboards in Arduino IoT Cloud. - -- **Predictive **maintenance**:** Combine the possibility to interact with wireless and wired sensors, given by the multiple connectivity options of Arduino Opta®, with the powerful microcontroller computational capabilities to implement AI algorithms for predictive maintenance. Edge computing and monitoring capabilities, thanks to the Arduino IoT Cloud features, can help to identify small drifts in your processes to address issues before they become a problem, reducing production line downtimes and ensuring quality outcomes. - - -## Features -### General Specifications Overview - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CharacteristicsDetails
Supply Voltage12...24 VDC
Inputs8x Analog/Digital inputs
Outputs4x Relays - Normally Open (NO) - Max: 10A each
ProcessorDual-core ST STM32H747XI Processor
Program Memory1 MB of RAM
Flash Memory2 MB
Flash QSPI Interface16 MB Flash QSPI. Shared between manufacturer's internal usage and data logging
Programming methodArduino + IEC-61131-3 (LD - SFC - FBD - ST - IL)
USB ConnectivityHost and Device operation, Programming/Flashing, Power delivery for programming (Not intended to drive external high-power peripherals)
CommunicationEthernet, RS-485 (AFX00001 & AFX00002), Wi-Fi® 2.4 GHz and Bluetooth® LE 4.2 supported by firmware, 5.1 supported by hardware (AFX00002)
SecurityATECC608B Crypto Microchip
Degree of ProtectionIP20
CertificationscULus, ENEC, FCC, CE, CB, UKCA
- -### Processor - - - - - - - - - - - - - - - - - - - - - - - - -
ComponentDetails
ST STM32H747XI Processor

Dual-core

-

Arm® Cortex®-M7 core at up to 480 MHz + Arm® 32-bit Cortex®-M4 core at up to 240 MHz

-
Flash Memory -

2 MB of Flash Memory with read-while-write support

-
Programming Memory1 MB of RAM
- -### Security - - - - - - - - - - - - - - - - - - - - - - - - - -
ComponentDetails
ATECC608B Crypto MicrochipCryptographic co-processor with secure hardware-based key storage
Protected storage for up to 16 Keys, certificates or data
Networking key management support
Secure boot support
Guaranteed unique 72-bit serial number
- -### Communication - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
InterfacesTypeProtocols/Technologies supported
Ethernet10/100BASE-T PortTCP/IP, MODBUS TCP
RS-485Half-duplex without termination resistanceMODBUS RTU, Custom serial communication
Wireless connectivityWi-Fi®2.4 GHz
Wireless connectivityBluetooth® Low Energy4.2 supported by firmware, 5.1 supported by hardware
- -### Inputs - - - - - - - - - - - - - - - - - - - - - - - - - -
CharacteristicsDetails
Number of inputs8x Analog/Digital inputs
Inputs overvoltage protectionyes
Antipolarity protectionyes
Input impedance8.9 kΩ
- -#### Analog Inputs - - - - - - - - - - - - - - - - - - - - - - - - - -
CharacteristicsDetails
Analog Input voltage0...10V
Analog Input resolution12...16 bits - User configurable
Analog Input LSB value166 µV
Accuracy+/- 5%, repeatability +/- 2%
- -#### Digital Inputs - - - - - - - - - - - - - - - - - - - - - - - - - -
CharacteristicsDetails
Digital Input voltage logic levelVIL Max: 4 VDC. VHL Min: 5.9 VDC
Digital Input current1.12mA at 10V
Digital Input frequency4.5 kHz
Cycle time for analog input acquisition10 µs
- -### Outputs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CharacteristicsDetails
Number of outputs4x relays (NO)
Max current per relay10A
Max peak current per relay15A
Continuous current per terminal10A
Short-circuit protectionNo, external fuse required
Relay rated voltage250 VAC
Relay Max voltage400 VAC
Rated load AC12500 VA
Rated load AC15 (230 VAC)500 VA
Breaking capacity DC1: 24/30/110/220V10/4/0.3/0.12A
Minimum switching load300mW (5V/5mA)
Max output line length (unshielded)100 m
Relay response time from state 0 to state 16 ms for relay output
Relay response time from state 1 to state 04 ms for relay output
Bounce time NO3 ms
Bounce time NC6 ms
Relay mechanical durability10 million cycles
Relay electrical durability10 thousand cycles with a resistive load of 10A
- -
- -## Ratings -### Recommended Operating Conditions - -| Description | Value | -|---------------------------------------------------|---------------------------| -| Temperature Operating Range | -20...50 °C | -| Protection degree rating | IP20 | -| Pollution degree | 2 conforming to IEC 61010 | - -### Power Specification - -| Property | Min | Typ | Max | Unit | -|----------------------- |------ |-----|------|------| -| Supply voltage | 12 | - | 24 | V | -| Permissible range | 10.2 | - | 27.6 | V | -| Power consumption (12V)| 0.6 | - | 2 | W | -| Power consumption (24V)| 0.6 | - | 2.2 | W | - -
- -## Functional Overview -### Product View -![Arduino Opta® Product View](assets/opta_panel.svg) - -
- -| Item | Feature | Item | Feature | -|------|---------------------------------------------------------------------|------|---------------------------------------------------------------------| -| 3A | Power Supply Terminals 12...24 VDC | 3H | Ethernet Port Status LEDs | -| 3B | I1...I8 digital/analog input terminals (0-10V) configurable via IDE | 3I | Label Holder | -| 3C | Reset Button | 3J | RS-485 terminal block (for Modbus RTU or proprietary communication) | -| 3D | User Programmable button | 3K | USB-C® for programming and data logging | -| 3E | Status LEDs 1...4 (User Programmable) | 3M | Ethernet port | -| 3F | Relay Output Terminals 1...4, NO contact (SPST) 10A 250 VAC | 3N | Port for communication and connection of auxiliary modules | -| 3G | Functional Earth | | | - -**Note:** The LED above the *User Programmable button* (Ref: 3D) is only available on Arduino Opta® WiFi (AFX00002). - -### Microcontroller -The microcontroller is a dual-core *STM32H747XI*. The main processor is a *Cortex M7* running at up to 480 MHz and the second one is a Cortex M4 running at up to 240 MHz. - -Arduino Opta® can be programmed using the libraries developed for it as part of the standard Arduino Core library. - -### Encryption -Encryption capabilities are provided by the *ATECC608B* chipset. This crypto-chip can be used to store sensitive information like security keys to connect to the Arduino® IoT Cloud or other third-party services, protecting Arduino Opta® from any unauthorized access in any kind of industrial and professional environment. - -### Ethernet -TCP/IP and Modbus TCP communication are supported. The 10/100 Ethernet physical interface is directly connected to the internal Ethernet MAC and provides full-duplex communication with automatic MDIX support. With an internet connection, Ethernet communication can be used to connect the device to the Arduino® IoT Cloud or other third-party services. - -### Modbus RTU -![Modbus RTU wiring diagram using the RS-485 interface](assets/opta_wiring_modbus.svg) - -Modbus RTU communication is supported using Arduino Opta's RS-485 physical interface. Note that **Arduino Opta® does not have internal terminator resistors** so they need to be added if necessary following the Modbus protocol specification. - -The wiring indication may vary depending on the connected device. In case the above connection indication is not resulting in consistent data transmission, invert the wires between A(-) and B(+) and retry. - -### Wi-Fi® and Bluetooth® Low Energy (AFX00002 Only) -The onboard wireless module allows simultaneous management of Wi-Fi® and Bluetooth® connectivity. The Wi-Fi® interface can be operated as an Access Point, as a Station or as a dual-mode simultaneous AP/STA, and can handle up to 65 Mbps transfer rate. Bluetooth® interface supports Bluetooth® Low Energy (4.2). - -With an internet connection, the Wi-Fi® communication can be used for connecting to the Arduino® IoT Cloud or other third-party services. - -### USB-C® -The USB-C® port can be used as a host or as a peripheral, but it cannot be used for both purposes at the same time. It is possible to use the connector to power the processor and flash it, but not to power the PLC outputs and peripherals. Additionally and using a USB memory stick, the USB-C® connector can be used for data logging purposes or to update the program inside the PLC. - -### Relay Outputs -Arduino Opta® has four *Normally Open* (NO) powerful 10A relays which are capable of actuating on loads at a rated voltage of 250 VAC and up to a maximum switching voltage of 400 VAC. - -The relay *Maximum Peak Current* is defined as the highest value of inrush current that the relay can endure without undergoing any permanent degradation of its characteristics due to the generated heat. The relay has to be able to hold up that maximum using a duty cycle of less or equal to 10% and for a time equal to or less than 0.5 s. - -In the case of Arduino Opta®, relays have a *Maximum Peak Current* of 15A. - -The *Rated Load* is the maximum resistive load that a contact can make, carry and break repeatedly. -- For resistive or slightly inductive loads (AC1 classification), Arduino Opta's *Rated Load* is 2500 VA. -- For small electromagnetic loads (> 72 VA) (AC15 classification) like power contactors, magnetic solenoid valves, electromagnets and AC single-phase supplies, Arduino Opta's *Rated Load* is 500 VA. This value assumes a peak inrush current of approximately 10 times the rated current and keeping it within the maximum peak current. - -For controlling DC loads (DC1 classification), the *Breaking Capacity* or maximum value of DC resistive current that a contact can make, carry and break repeatedly, is 10/4/0.3/0.12A for respectively 24/30/110/220V. - -In the case of the minimum switching load parameters, the minimum values of power, voltage and current that the relays can reliably switch, are 300 mW/ 5V / 5mA. This implies that with 5V the current must be at least 60mA, with 24V, it must be at least 12.5mA, and with 5mA the voltage must be at least 60V. - -The relays on Arduino Opta® provide a very fast response time of 6/4 ms to change state for closing/reopening, and a bounce time NO/NC of 3/6 ms. - -### Expansion Port -The expansion port can be used to expand the Arduino Opta® capabilities with the help of additional modules. Reserved for future functionality. - -### Programmable User Button -A pushbutton is accessible on the front panel of the Arduino Opta®. The functionality of this button can be configured via software. Note that the LED above the *User button* is only available on Arduino Opta® WiFi (AFX00002). - -### Functional Earth -To avoid and reduce electrical noise, Arduino Opta® has a *Functional Earth* connector (Ref: 3G) near the Ethernet connector. *Functional Earth*, not to be confused with *Ground*, helps the device to reduce electrical interferences in industrial environments, being crucial for having stable Fieldbus communications. - -## Device Operation -### Getting Started - IDE -If you want to program your Arduino Opta® while offline you need to install the Arduino® Desktop IDE **[1]**. To connect the Arduino Opta® to your computer, you will need a USB-C® cable. - -### Getting Started - Arduino Web Editor -All Arduino® devices work out-of-the-box on the Arduino® Web Editor **[2]** by just installing a simple plugin. - -The Arduino® Web Editor is hosted online, therefore it will always be up-to-date with the latest features and support for all boards and devices. Follow **[3]** to start coding on the browser and upload your sketches onto your device. - -### Getting Started - Arduino PLC IDE -Arduino Opta® can be also programmed using the industrial-standard **_IEC 61131-3_** programming languages. Download the Arduino® PLC IDE **[4]** software and connect your Arduino Opta® to your computer, using a simple USB-C® cable, to start creating your own PLC industrial solutions. - -### Getting Started - Arduino IoT Cloud -All Arduino® IoT enabled products are supported on Arduino® IoT Cloud which allows you to log, graph and analyze sensor data, trigger events, and automate your home or business. - -### Sample Sketches -Sample sketches for Arduino Opta® can be found either in the “Examples” menu in the Arduino® IDE or the “Arduino Opta® Documentation” section of Arduino® **[5]**. - -### Online Resources -Now that you have gone through the basics of what you can do with the device, you can explore the endless possibilities it provides by checking exciting projects on ProjectHub **[6]**, the Arduino® Library Reference **[7]** and the online store **[8]** where you will be able to complement your Arduino Opta® product with additional extensions, sensors and actuators. - - -## Mechanical Information -### Product Dimensions -![Arduino Opta® Outline. Dimensions are in mm](assets/opta_mechanical.svg) - -***Note: Terminals can be used with both solid and stranded core wire (min: 0.5 mm2 / 20 AWG).*** - - -## Certifications - -### Certifications Summary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CertArduino Opta® RS485 (AFX00001)Arduino Opta® WiFi (AFX00002)Arduino Opta® Lite (AFX00003)
CE (EU) -

EN IEC 61326-1:2021

-

EN IEC 61010 (LVD)

-
-

EN IEC 62311:2020

-

EN IEC 61010 (LVD)

-

EN 301 489-1 V2.2.3

-

EN 301 489-17 V3.2.4

-

IEC 61326-1:2021

-

EN 300 328 V2.2.2:2019-07

-
-

EN IEC 61326-1:2021

-

EN IEC 61010 (LVD)

-
CB (EU)YesYesYes
WEEE (EU)YesYesYes
ENEC -

Yes

-
-

Yes

-
-

Yes

-
REACH (EU)YesYesYes
UKCA (UK)EN IEC 61326-1:2021 -

EN IEC 62311:2020

-

EN 300 328 V2.2.2:2019-07

-

EN 301 489-1 V2.2.3

-

EN 301 489-17 V3.2.4

-

IEC 61326-1:2021

-

EN 300 328 V2.2.2:2019-07

-
EN IEC 61326-1:2021
FCC (US) -

Yes

-
-

Yes

-
-

Yes

-
cULus -

UL 61010-2-201

-
-

UL 61010-2-201

-
-

UL 61010-2-201

-
- -### Declaration of Conformity CE DoC (EU) -We declare under our sole responsibility that the products above are in conformity with the essential requirements of the following EU Directives and therefore qualify for free movement within markets comprising the European Union (EU) and European Economic Area (EEA). - -### Declaration of Conformity to EU RoHS & REACH 211 01/19/2021 - -Arduino boards are in compliance with RoHS 2 Directive 2011/65/EU of the European Parliament and RoHS 3 Directive 2015/863/EU of the Council of 4 June 2015 on the restriction of the use of certain hazardous substances in electrical and electronic equipment. - -| Substance | **Maximum limit (ppm)** | -|----------------------------------------|-------------------------| -| Lead (Pb) | 1000 | -| Cadmium (Cd) | 100 | -| Mercury (Hg) | 1000 | -| Hexavalent Chromium (Cr6+) | 1000 | -| Poly Brominated Biphenyls (PBB) | 1000 | -| Poly Brominated Diphenyl ethers (PBDE) | 1000 | -| Bis(2-Ethylhexyl} phthalate (DEHP) | 1000 | -| Benzyl butyl phthalate (BBP) | 1000 | -| Dibutyl phthalate (DBP) | 1000 | -| Diisobutyl phthalate (DIBP) | 1000 | - -Exemptions: No exemptions are claimed. - -Arduino Boards are fully compliant with the related requirements of European Union Regulation (EC) 1907 /2006 concerning the Registration, Evaluation, Authorization and Restriction of Chemicals (REACH). We declare none of the SVHCs (https://echa.europa.eu/web/guest/candidate-list-table), the Candidate List of Substances of Very High Concern for authorization currently released by ECHA, is present in all products (and also package) in quantities totaling in a concentration equal or above 0.1%. To the best of our knowledge, we also declare that our products do not contain any of the substances listed on the "Authorization List" (Annex XIV of the REACH regulations) and Substances of Very High Concern (SVHC) in any significant amounts as specified by the Annex XVII of Candidate list published by ECHA (European Chemical Agency) 1907 /2006/EC. - -### Conflict Minerals Declaration -As a global supplier of electronic and electrical components, Arduino is aware of our obligations with regards to laws and regulations regarding Conflict Minerals, specifically the Dodd-Frank Wall Street Reform and Consumer Protection Act, Section 1502. Arduino does not directly source or process conflict minerals such as Tin, Tantalum, Tungsten, or Gold. Conflict minerals are contained in our products in the form of solder, or as a component in metal alloys. As part of our reasonable due diligence Arduino has contacted component suppliers within our supply chain to verify their continued compliance with the regulations. Based on the information received thus far we declare that our products contain Conflict Minerals sourced from conflict-free areas. - -## FCC Caution -Any Changes or modifications not expressly approved by the party responsible for compliance could void the user’s authority to operate the equipment. - -This device complies with part 15 of the FCC Rules. Operation is subject to the following two conditions: - -(1) This device may not cause harmful interference - -(2) this device must accept any interference received, including interference that may cause undesired operation. - -**FCC RF Radiation Exposure Statement:** - -1. This Transmitter must not be co-located or operating in conjunction with any other antenna or transmitter. - -2. This equipment complies with RF radiation exposure limits set forth for an uncontrolled environment. - -3. This equipment should be installed and operated with a minimum distance of 20 cm between the radiator & your body. - -English: -User manuals for license-exempt radio apparatus shall contain the following or equivalent notice in a conspicuous location in the user manual or alternatively on the device or both. This device complies with Industry Canada licence-exempt RSS standard(s). Operation is subject to the following two conditions: - -(1) this device may not cause interference - -(2) this device must accept any interference, including interference that may cause undesired operation of the device. - -French: -Le présent appareil est conforme aux CNR d’Industrie Canada applicables aux appareils radio exempts de licence. L’exploitation est autorisée aux deux conditions suivantes: - -(1) l’ appareil nedoit pas produire de brouillage - -(2) l’utilisateur de l’appareil doit accepter tout brouillage radioélectrique subi, même si le brouillage est susceptible d’en compromettre le fonctionnement. - -**IC SAR Warning:** - -English: -This equipment should be installed and operated with a minimum distance of 20 cm between the radiator and your body. - -French: -Lors de l’ installation et de l’ exploitation de ce dispositif, la distance entre le radiateur et le corps est d ’au moins 20 cm. - -**Important:** The operating temperature of the EUT can’t exceed 85℃ and shouldn’t be lower than -40℃. - -Hereby, Arduino S.r.l. declares that this product is in compliance with essential requirements and other relevant provisions of Directive 2014/53/EU. This product is allowed to be used in all EU member states. - -## Company Information - -| Company name | Arduino SRL | -|-----------------|-------------------------------------------------| -| Company Address | Via Andrea Appiani, 25 - 20900 MONZA(Italy) | - - -## Reference Documentation -| **Ref** | **Link** | -|:---------------------------------:|---------------------------------------------------------------------------------------------| -| Arduino IDE (Desktop) | https://www.arduino.cc/en/Main/Software | -| Arduino IDE (Cloud) | https://create.arduino.cc/editor | -| Arduino Cloud - Getting started | https://docs.arduino.cc/arduino-cloud/getting-started/iot-cloud-getting-started | -| Arduino PLC IDE | https://www.arduino.cc/en/Main/Software | -| Arduino Opta® Documentation | https://docs.arduino.cc/hardware/opta | -| Project Hub | https://create.arduino.cc/projecthub?by=part&part_id=11332&sort=trending | -| Library Reference | https://www.arduino.cc/reference/en/ | -| Online Store | https://store.arduino.cc/ | - -## Revision History - -| Date | **Revision** | **Changes** | -|------------|--------------|---------------| -| 02/03/2023 | 1 | First Release | - +--- +identifier: AFX00001-AFX00002-AFX00003 +title: Arduino Opta® +type: pro +variant: 'Collective Datasheet' +author: Ali Jahangiri, Julián Caro Linares +--- +![](assets/featured.png) + +# Description +Arduino Opta® is a secure, easy-to-use micro PLC with Industrial IoT capabilities. Designed in partnership with leading relay manufacturer Finder®, it allows professionals to scale up industrial and building automation projects while taking advantage of the Arduino ecosystem. + +The Arduino Opta® family has three variants: the Arduino Opta® Lite, Arduino Opta® RS485, and Arduino Opta® WiFi, all of them documented inside this document. + + +# Target Areas: +Industrial IoT, Building automation, Electrical loads management, Industrial automation + + +# CONTENTS +## Product Variants +There are three variants of the Arduino Opta® created to fit the different needs of each industry and application. The difference between each of the variants can be found in the following table: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameArduino Opta® LiteArduino Opta® RS485Arduino Opta® WiFi
SKUAFX00003AFX00001AFX00002
USB +

USB-C®

+
+

USB-C®

+
+

USB-C®

+
Ethernet Support10/100BASE-T Port10/100BASE-T Port10/100BASE-T Port
RS-485N/AHalf-duplexHalf-duplex
Wi-Fi®N/AN/A802.11 b/g/n
Bluetooth®N/AN/ABluetooth® Low Energy
+ +## Application Examples +Arduino Opta® is designed for industrial standard machinery control as a PLC with advanced features such as AI and connectivity capabilities. It is readily integrated into the Arduino hardware and software ecosystem, including real-time monitoring via the Arduino IoT Cloud. + + +- **Conveyor belt management:** Arduino Opta® offers the possibility to configure its inputs as digital or analog to flexibly collect data from several types of sensors. Thanks to the Wi-Fi®/Bluetooth® Low Energy connectivity, Arduino Opta® can also be smoothly integrated with sensing boards, like the Nicla® ones from the Arduino ecosystem, leveraging Arduino Opta's potential with vision, sound, weight detection, air quality measurement and many other capabilities. + + Arduino Opta® can use the data from the various sensors as they are or, thanks to its powerful microcontroller, use the outcome from a computation, to operate a wide variety of industrial machinery through its high-performing relays. + + All these features, wrapped in a compact form factor, make Arduino Opta® the ideal solution for product flow management in conveyor belts, automated packing or bottling lines. + +- **Real-time industrial monitoring:** Get instant access to your factory floor data and to the insights of your industrial processes to leverage your manufacturing excellence to continuous improvement. Implement visual management and KPIs monitoring thanks to the Arduino Opta's built-in connectivity features (Ethernet on all the product variants, Fieldbus and WiFi®/Bluetooth® Low Energy upon choice), delivering in a simple, fast and reliable way the data collected through beautiful dashboards in Arduino IoT Cloud. + +- **Predictive **maintenance**:** Combine the possibility to interact with wireless and wired sensors, given by the multiple connectivity options of Arduino Opta®, with the powerful microcontroller computational capabilities to implement AI algorithms for predictive maintenance. Edge computing and monitoring capabilities, thanks to the Arduino IoT Cloud features, can help to identify small drifts in your processes to address issues before they become a problem, reducing production line downtimes and ensuring quality outcomes. + + +## Features +### General Specifications Overview + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CharacteristicsDetails
Supply Voltage12...24 VDC
Inputs8x Analog/Digital inputs
Outputs4x Relays - Normally Open (NO) - Max: 10A each
ProcessorDual-core ST STM32H747XI Processor
Program Memory1 MB of RAM
Flash Memory2 MB
Flash QSPI Interface16 MB Flash QSPI. Shared between manufacturer's internal usage and data logging
Programming methodArduino + IEC-61131-3 (LD - SFC - FBD - ST - IL)
USB ConnectivityHost and Device operation, Programming/Flashing, Power delivery for programming (Not intended to drive external high-power peripherals)
CommunicationEthernet, RS-485 (AFX00001 & AFX00002), Wi-Fi® 2.4 GHz and Bluetooth® LE 4.2 supported by firmware, 5.1 supported by hardware (AFX00002)
SecurityATECC608B Crypto Microchip
Degree of ProtectionIP20
CertificationscULus, ENEC, FCC, CE, CB, UKCA
+ +### Processor + + + + + + + + + + + + + + + + + + + + + + + + +
ComponentDetails
ST STM32H747XI Processor

Dual-core

+

Arm® Cortex®-M7 core at up to 480 MHz + Arm® 32-bit Cortex®-M4 core at up to 240 MHz

+
Flash Memory +

2 MB of Flash Memory with read-while-write support

+
Programming Memory1 MB of RAM
+ +### Security + + + + + + + + + + + + + + + + + + + + + + + + + +
ComponentDetails
ATECC608B Crypto MicrochipCryptographic co-processor with secure hardware-based key storage
Protected storage for up to 16 Keys, certificates or data
Networking key management support
Secure boot support
Guaranteed unique 72-bit serial number
+ +### Communication + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
InterfacesTypeProtocols/Technologies supported
Ethernet10/100BASE-T PortTCP/IP, MODBUS TCP
RS-485Half-duplex without termination resistanceMODBUS RTU, Custom serial communication
Wireless connectivityWi-Fi®2.4 GHz
Wireless connectivityBluetooth® Low Energy4.2 supported by firmware, 5.1 supported by hardware
+ +### Inputs + + + + + + + + + + + + + + + + + + + + + + + + + +
CharacteristicsDetails
Number of inputs8x Analog/Digital inputs
Inputs overvoltage protectionyes
Antipolarity protectionyes
Input impedance8.9 kΩ
+ +#### Analog Inputs + + + + + + + + + + + + + + + + + + + + + + + + + +
CharacteristicsDetails
Analog Input voltage0...10V
Analog Input resolution12...16 bits - User configurable
Analog Input LSB value166 µV
Accuracy+/- 5%, repeatability +/- 2%
+ +#### Digital Inputs + + + + + + + + + + + + + + + + + + + + + + + + + +
CharacteristicsDetails
Digital Input voltage logic levelVIL Max: 4 VDC. VHL Min: 5.9 VDC
Digital Input current1.12mA at 10V
Digital Input frequency4.5 kHz
Cycle time for analog input acquisition10 µs
+ +### Outputs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CharacteristicsDetails
Number of outputs4x relays (NO)
Max current per relay10A
Max peak current per relay15A
Continuous current per terminal10A
Short-circuit protectionNo, external fuse required
Relay rated voltage250 VAC
Relay Max voltage400 VAC
Rated load AC12500 VA
Rated load AC15 (230 VAC)500 VA
Breaking capacity DC1: 24/30/110/220V10/4/0.3/0.12A
Minimum switching load300mW (5V/5mA)
Max output line length (unshielded)100 m
Relay response time from state 0 to state 16 ms for relay output
Relay response time from state 1 to state 04 ms for relay output
Bounce time NO3 ms
Bounce time NC6 ms
Relay mechanical durability10 million cycles
Relay electrical durability10 thousand cycles with a resistive load of 10A
+ +
+ +## Ratings +### Recommended Operating Conditions + +| Description | Value | +|---------------------------------------------------|---------------------------| +| Temperature Operating Range | -20...50 °C | +| Protection degree rating | IP20 | +| Pollution degree | 2 conforming to IEC 61010 | + +### Power Specification + +| Property | Min | Typ | Max | Unit | +|----------------------- |------ |-----|------|------| +| Supply voltage | 12 | - | 24 | V | +| Permissible range | 10.2 | - | 27.6 | V | +| Power consumption (12V)| 0.6 | - | 2 | W | +| Power consumption (24V)| 0.6 | - | 2.2 | W | + +
+ +## Functional Overview +### Product View +![Arduino Opta® Product View](assets/opta_panel.svg) + +
+ +| Item | Feature | Item | Feature | +|------|---------------------------------------------------------------------|------|---------------------------------------------------------------------| +| 3A | Power Supply Terminals 12...24 VDC | 3H | Ethernet Port Status LEDs | +| 3B | I1...I8 digital/analog input terminals (0-10V) configurable via IDE | 3I | Label Holder | +| 3C | Reset Button | 3J | RS-485 terminal block (for Modbus RTU or proprietary communication) | +| 3D | User Programmable button | 3K | USB-C® for programming and data logging | +| 3E | Status LEDs 1...4 (User Programmable) | 3M | Ethernet port | +| 3F | Relay Output Terminals 1...4, NO contact (SPST) 10A 250 VAC | 3N | Port for communication and connection of auxiliary modules | +| 3G | Functional Earth | | | + +**Note:** The LED above the *User Programmable button* (Ref: 3D) is only available on Arduino Opta® WiFi (AFX00002). + +### Microcontroller +The microcontroller is a dual-core *STM32H747XI*. The main processor is a *Cortex M7* running at up to 480 MHz and the second one is a Cortex M4 running at up to 240 MHz. + +Arduino Opta® can be programmed using the libraries developed for it as part of the standard Arduino Core library. + +### Encryption +Encryption capabilities are provided by the *ATECC608B* chipset. This crypto-chip can be used to store sensitive information like security keys to connect to the Arduino® IoT Cloud or other third-party services, protecting Arduino Opta® from any unauthorized access in any kind of industrial and professional environment. + +### Ethernet +TCP/IP and Modbus TCP communication are supported. The 10/100 Ethernet physical interface is directly connected to the internal Ethernet MAC and provides full-duplex communication with automatic MDIX support. With an internet connection, Ethernet communication can be used to connect the device to the Arduino® IoT Cloud or other third-party services. + +### Modbus RTU +![Modbus RTU wiring diagram using the RS-485 interface](assets/opta_wiring_modbus.svg) + +Modbus RTU communication is supported using Arduino Opta's RS-485 physical interface. Note that **Arduino Opta® does not have internal terminator resistors** so they need to be added if necessary following the Modbus protocol specification. + +The wiring indication may vary depending on the connected device. In case the above connection indication is not resulting in consistent data transmission, invert the wires between A(-) and B(+) and retry. + +### Wi-Fi® and Bluetooth® Low Energy (AFX00002 Only) +The onboard wireless module allows simultaneous management of Wi-Fi® and Bluetooth® connectivity. The Wi-Fi® interface can be operated as an Access Point, as a Station or as a dual-mode simultaneous AP/STA, and can handle up to 65 Mbps transfer rate. Bluetooth® interface supports Bluetooth® Low Energy (4.2). + +With an internet connection, the Wi-Fi® communication can be used for connecting to the Arduino® IoT Cloud or other third-party services. + +### USB-C® +The USB-C® port can be used as a host or as a peripheral, but it cannot be used for both purposes at the same time. It is possible to use the connector to power the processor and flash it, but not to power the PLC outputs and peripherals. Additionally and using a USB memory stick, the USB-C® connector can be used for data logging purposes or to update the program inside the PLC. + +### Relay Outputs +Arduino Opta® has four *Normally Open* (NO) powerful 10A relays which are capable of actuating on loads at a rated voltage of 250 VAC and up to a maximum switching voltage of 400 VAC. + +The relay *Maximum Peak Current* is defined as the highest value of inrush current that the relay can endure without undergoing any permanent degradation of its characteristics due to the generated heat. The relay has to be able to hold up that maximum using a duty cycle of less or equal to 10% and for a time equal to or less than 0.5 s. + +In the case of Arduino Opta®, relays have a *Maximum Peak Current* of 15A. + +The *Rated Load* is the maximum resistive load that a contact can make, carry and break repeatedly. +- For resistive or slightly inductive loads (AC1 classification), Arduino Opta's *Rated Load* is 2500 VA. +- For small electromagnetic loads (> 72 VA) (AC15 classification) like power contactors, magnetic solenoid valves, electromagnets and AC single-phase supplies, Arduino Opta's *Rated Load* is 500 VA. This value assumes a peak inrush current of approximately 10 times the rated current and keeping it within the maximum peak current. + +For controlling DC loads (DC1 classification), the *Breaking Capacity* or maximum value of DC resistive current that a contact can make, carry and break repeatedly, is 10/4/0.3/0.12A for respectively 24/30/110/220V. + +In the case of the minimum switching load parameters, the minimum values of power, voltage and current that the relays can reliably switch, are 300 mW/ 5V / 5mA. This implies that with 5V the current must be at least 60mA, with 24V, it must be at least 12.5mA, and with 5mA the voltage must be at least 60V. + +The relays on Arduino Opta® provide a very fast response time of 6/4 ms to change state for closing/reopening, and a bounce time NO/NC of 3/6 ms. + +### Expansion Port +The expansion port can be used to expand the Arduino Opta® capabilities with the help of additional modules. Reserved for future functionality. + +### Programmable User Button +A pushbutton is accessible on the front panel of the Arduino Opta®. The functionality of this button can be configured via software. Note that the LED above the *User button* is only available on Arduino Opta® WiFi (AFX00002). + +### Functional Earth +To avoid and reduce electrical noise, Arduino Opta® has a *Functional Earth* connector (Ref: 3G) near the Ethernet connector. *Functional Earth*, not to be confused with *Ground*, helps the device to reduce electrical interferences in industrial environments, being crucial for having stable Fieldbus communications. + +## Device Operation +### Getting Started - IDE +If you want to program your Arduino Opta® while offline you need to install the Arduino® Desktop IDE **[1]**. To connect the Arduino Opta® to your computer, you will need a USB-C® cable. + +### Getting Started - Arduino Web Editor +All Arduino® devices work out-of-the-box on the Arduino® Web Editor **[2]** by just installing a simple plugin. + +The Arduino® Web Editor is hosted online, therefore it will always be up-to-date with the latest features and support for all boards and devices. Follow **[3]** to start coding on the browser and upload your sketches onto your device. + +### Getting Started - Arduino PLC IDE +Arduino Opta® can be also programmed using the industrial-standard **_IEC 61131-3_** programming languages. Download the Arduino® PLC IDE **[4]** software and connect your Arduino Opta® to your computer, using a simple USB-C® cable, to start creating your own PLC industrial solutions. + +### Getting Started - Arduino IoT Cloud +All Arduino® IoT enabled products are supported on Arduino® IoT Cloud which allows you to log, graph and analyze sensor data, trigger events, and automate your home or business. + +### Sample Sketches +Sample sketches for Arduino Opta® can be found either in the “Examples” menu in the Arduino® IDE or the “Arduino Opta® Documentation” section of Arduino® **[5]**. + +### Online Resources +Now that you have gone through the basics of what you can do with the device, you can explore the endless possibilities it provides by checking exciting projects on ProjectHub **[6]**, the Arduino® Library Reference **[7]** and the online store **[8]** where you will be able to complement your Arduino Opta® product with additional extensions, sensors and actuators. + + +## Mechanical Information +### Product Dimensions +![Arduino Opta® Outline. Dimensions are in mm](assets/opta_mechanical.svg) + +***Note: Terminals can be used with both solid and stranded core wire (min: 0.5 mm2 / 20 AWG).*** + + +## Certifications + +### Certifications Summary + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CertArduino Opta® RS485 (AFX00001)Arduino Opta® WiFi (AFX00002)Arduino Opta® Lite (AFX00003)
CE (EU) +

EN IEC 61326-1:2021

+

EN IEC 61010 (LVD)

+
+

EN IEC 62311:2020

+

EN IEC 61010 (LVD)

+

EN 301 489-1 V2.2.3

+

EN 301 489-17 V3.2.4

+

IEC 61326-1:2021

+

EN 300 328 V2.2.2:2019-07

+
+

EN IEC 61326-1:2021

+

EN IEC 61010 (LVD)

+
CB (EU)YesYesYes
WEEE (EU)YesYesYes
ENEC +

Yes

+
+

Yes

+
+

Yes

+
REACH (EU)YesYesYes
UKCA (UK)EN IEC 61326-1:2021 +

EN IEC 62311:2020

+

EN 300 328 V2.2.2:2019-07

+

EN 301 489-1 V2.2.3

+

EN 301 489-17 V3.2.4

+

IEC 61326-1:2021

+

EN 300 328 V2.2.2:2019-07

+
EN IEC 61326-1:2021
FCC (US) +

Yes

+
+

Yes

+
+

Yes

+
cULus +

UL 61010-2-201

+
+

UL 61010-2-201

+
+

UL 61010-2-201

+
+ +### Declaration of Conformity CE DoC (EU) +We declare under our sole responsibility that the products above are in conformity with the essential requirements of the following EU Directives and therefore qualify for free movement within markets comprising the European Union (EU) and European Economic Area (EEA). + +### Declaration of Conformity to EU RoHS & REACH 211 01/19/2021 + +Arduino boards are in compliance with RoHS 2 Directive 2011/65/EU of the European Parliament and RoHS 3 Directive 2015/863/EU of the Council of 4 June 2015 on the restriction of the use of certain hazardous substances in electrical and electronic equipment. + +| Substance | **Maximum limit (ppm)** | +|----------------------------------------|-------------------------| +| Lead (Pb) | 1000 | +| Cadmium (Cd) | 100 | +| Mercury (Hg) | 1000 | +| Hexavalent Chromium (Cr6+) | 1000 | +| Poly Brominated Biphenyls (PBB) | 1000 | +| Poly Brominated Diphenyl ethers (PBDE) | 1000 | +| Bis(2-Ethylhexyl} phthalate (DEHP) | 1000 | +| Benzyl butyl phthalate (BBP) | 1000 | +| Dibutyl phthalate (DBP) | 1000 | +| Diisobutyl phthalate (DIBP) | 1000 | + +Exemptions: No exemptions are claimed. + +Arduino Boards are fully compliant with the related requirements of European Union Regulation (EC) 1907 /2006 concerning the Registration, Evaluation, Authorization and Restriction of Chemicals (REACH). We declare none of the SVHCs (https://echa.europa.eu/web/guest/candidate-list-table), the Candidate List of Substances of Very High Concern for authorization currently released by ECHA, is present in all products (and also package) in quantities totaling in a concentration equal or above 0.1%. To the best of our knowledge, we also declare that our products do not contain any of the substances listed on the "Authorization List" (Annex XIV of the REACH regulations) and Substances of Very High Concern (SVHC) in any significant amounts as specified by the Annex XVII of Candidate list published by ECHA (European Chemical Agency) 1907 /2006/EC. + +### Conflict Minerals Declaration +As a global supplier of electronic and electrical components, Arduino is aware of our obligations with regards to laws and regulations regarding Conflict Minerals, specifically the Dodd-Frank Wall Street Reform and Consumer Protection Act, Section 1502. Arduino does not directly source or process conflict minerals such as Tin, Tantalum, Tungsten, or Gold. Conflict minerals are contained in our products in the form of solder, or as a component in metal alloys. As part of our reasonable due diligence Arduino has contacted component suppliers within our supply chain to verify their continued compliance with the regulations. Based on the information received thus far we declare that our products contain Conflict Minerals sourced from conflict-free areas. + +## FCC Caution +Any Changes or modifications not expressly approved by the party responsible for compliance could void the user’s authority to operate the equipment. + +This device complies with part 15 of the FCC Rules. Operation is subject to the following two conditions: + +(1) This device may not cause harmful interference + +(2) this device must accept any interference received, including interference that may cause undesired operation. + +**FCC RF Radiation Exposure Statement:** + +1. This Transmitter must not be co-located or operating in conjunction with any other antenna or transmitter. + +2. This equipment complies with RF radiation exposure limits set forth for an uncontrolled environment. + +3. This equipment should be installed and operated with a minimum distance of 20 cm between the radiator & your body. + +English: +User manuals for license-exempt radio apparatus shall contain the following or equivalent notice in a conspicuous location in the user manual or alternatively on the device or both. This device complies with Industry Canada licence-exempt RSS standard(s). Operation is subject to the following two conditions: + +(1) this device may not cause interference + +(2) this device must accept any interference, including interference that may cause undesired operation of the device. + +French: +Le présent appareil est conforme aux CNR d’Industrie Canada applicables aux appareils radio exempts de licence. L’exploitation est autorisée aux deux conditions suivantes: + +(1) l’ appareil nedoit pas produire de brouillage + +(2) l’utilisateur de l’appareil doit accepter tout brouillage radioélectrique subi, même si le brouillage est susceptible d’en compromettre le fonctionnement. + +**IC SAR Warning:** + +English: +This equipment should be installed and operated with a minimum distance of 20 cm between the radiator and your body. + +French: +Lors de l’ installation et de l’ exploitation de ce dispositif, la distance entre le radiateur et le corps est d ’au moins 20 cm. + +**Important:** The operating temperature of the EUT can’t exceed 85℃ and shouldn’t be lower than -40℃. + +Hereby, Arduino S.r.l. declares that this product is in compliance with essential requirements and other relevant provisions of Directive 2014/53/EU. This product is allowed to be used in all EU member states. + +## Company Information + +| Company name | Arduino SRL | +|-----------------|-------------------------------------------------| +| Company Address | Via Andrea Appiani, 25 - 20900 MONZA(Italy) | + + +## Reference Documentation +| **Ref** | **Link** | +|:---------------------------------:|---------------------------------------------------------------------------------------------| +| Arduino IDE (Desktop) | https://www.arduino.cc/en/Main/Software | +| Arduino IDE (Cloud) | https://create.arduino.cc/editor | +| Arduino Cloud - Getting started | https://docs.arduino.cc/arduino-cloud/getting-started/iot-cloud-getting-started | +| Arduino PLC IDE | https://www.arduino.cc/en/Main/Software | +| Arduino Opta® Documentation | https://docs.arduino.cc/hardware/opta | +| Project Hub | https://create.arduino.cc/projecthub?by=part&part_id=11332&sort=trending | +| Library Reference | https://www.arduino.cc/reference/en/ | +| Online Store | https://store.arduino.cc/ | + +## Revision History + +| Date | **Revision** | **Changes** | +|------------|--------------|---------------| +| 02/03/2023 | 1 | First Release | + diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/features.md b/content/hardware/07.opta/opta-family/opta/features.md similarity index 99% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/features.md rename to content/hardware/07.opta/opta-family/opta/features.md index a0d7430118..60992d7ec4 100644 --- a/content/hardware/05.pro-solutions/solutions-and-kits/opta/features.md +++ b/content/hardware/07.opta/opta-family/opta/features.md @@ -7,6 +7,7 @@ It allows professionals to scale up automation projects while taking advantage o Quickly put it to work, leveraging the many available software libraries. The onboard secure element ensures Over-The-Air firmware updates and remote control via the Arduino Cloud or third-party services. Arduino Opta® is available in three variants: + * Arduino Opta® Lite: on-board Ethernet and USB-C® ports * Arduino Opta® RS485: on-board Ethernet and USB-C® ports, plus RS-485 connectivity * Arduino Opta® WiFi: on-board Ethernet and USB-C® ports, plus RS-485 and Wi-Fi®/Bluetooth® Low Energy diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/image.svg b/content/hardware/07.opta/opta-family/opta/image.svg similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/image.svg rename to content/hardware/07.opta/opta-family/opta/image.svg diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/product.md b/content/hardware/07.opta/opta-family/opta/product.md similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/product.md rename to content/hardware/07.opta/opta-family/opta/product.md diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tech-specs.md b/content/hardware/07.opta/opta-family/opta/tech-specs.md similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tech-specs.md rename to content/hardware/07.opta/opta-family/opta/tech-specs.md diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tech-specs.yml b/content/hardware/07.opta/opta-family/opta/tech-specs.yml similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tech-specs.yml rename to content/hardware/07.opta/opta-family/opta/tech-specs.yml diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-connectivity/assets/opta-ble.svg b/content/hardware/07.opta/opta-family/opta/tutorials/getting-started-connectivity/assets/opta-ble.svg similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-connectivity/assets/opta-ble.svg rename to content/hardware/07.opta/opta-family/opta/tutorials/getting-started-connectivity/assets/opta-ble.svg diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-connectivity/assets/opta-ethernet.svg b/content/hardware/07.opta/opta-family/opta/tutorials/getting-started-connectivity/assets/opta-ethernet.svg similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-connectivity/assets/opta-ethernet.svg rename to content/hardware/07.opta/opta-family/opta/tutorials/getting-started-connectivity/assets/opta-ethernet.svg diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-connectivity/assets/opta-wifi.svg b/content/hardware/07.opta/opta-family/opta/tutorials/getting-started-connectivity/assets/opta-wifi.svg similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-connectivity/assets/opta-wifi.svg rename to content/hardware/07.opta/opta-family/opta/tutorials/getting-started-connectivity/assets/opta-wifi.svg diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-connectivity/content.md b/content/hardware/07.opta/opta-family/opta/tutorials/getting-started-connectivity/content.md similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-connectivity/content.md rename to content/hardware/07.opta/opta-family/opta/tutorials/getting-started-connectivity/content.md diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-with-modbus-rtu/assets/Opta_Modbus_RTU_Example.zip b/content/hardware/07.opta/opta-family/opta/tutorials/getting-started-with-modbus-rtu/assets/Opta_Modbus_RTU_Example.zip similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-with-modbus-rtu/assets/Opta_Modbus_RTU_Example.zip rename to content/hardware/07.opta/opta-family/opta/tutorials/getting-started-with-modbus-rtu/assets/Opta_Modbus_RTU_Example.zip diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-with-modbus-rtu/assets/opta-modbus-client.svg b/content/hardware/07.opta/opta-family/opta/tutorials/getting-started-with-modbus-rtu/assets/opta-modbus-client.svg similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-with-modbus-rtu/assets/opta-modbus-client.svg rename to content/hardware/07.opta/opta-family/opta/tutorials/getting-started-with-modbus-rtu/assets/opta-modbus-client.svg diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-with-modbus-rtu/assets/opta-modbus-connection.svg b/content/hardware/07.opta/opta-family/opta/tutorials/getting-started-with-modbus-rtu/assets/opta-modbus-connection.svg similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-with-modbus-rtu/assets/opta-modbus-connection.svg rename to content/hardware/07.opta/opta-family/opta/tutorials/getting-started-with-modbus-rtu/assets/opta-modbus-connection.svg diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-with-modbus-rtu/content.md b/content/hardware/07.opta/opta-family/opta/tutorials/getting-started-with-modbus-rtu/content.md similarity index 97% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-with-modbus-rtu/content.md rename to content/hardware/07.opta/opta-family/opta/tutorials/getting-started-with-modbus-rtu/content.md index 7a94a3e395..b325f845c4 100644 --- a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-with-modbus-rtu/content.md +++ b/content/hardware/07.opta/opta-family/opta/tutorials/getting-started-with-modbus-rtu/content.md @@ -1,504 +1,504 @@ ---- -title: 'Getting Started with Modbus RTU on Opta™' -description: "Learn how to use the Modbus RTU serial protocol on Opta™." -author: 'José Bagur and Taddy Chung' -libraries: - - name: 'ArduinoRS485' - url: https://www.arduino.cc/reference/en/libraries/arduinors485 - - name: 'ArduinoModbus' - url: https://www.arduino.cc/reference/en/libraries/arduinomodbus -difficulty: intermediate -tags: - - Getting-started - - ModbusRTU - - RS-485 -software: - - ide-v1 - - ide-v2 - - arduino-cli - - web-editor -hardware: - - hardware/05.pro-solutions/solutions-and-kits/opta ---- - -## Overview - -The **Opta™**, with its industrial hardware and software capabilities, and the Arduino ecosystem tools such as the Arduino IDE and its libraries, provide several types of Modbus communication protocol with effortless implementation thanks to its robust design. - -The Modbus RTU protocol is one of the protocols available within Opta™. In this tutorial, we will learn how to implement Modbus RTU communications protocol over RS-485 between two Opta™ devices. - -## Goals - -- Learn how to establish RS-485 interface connection between two Opta™ devices -- Learn how to use the Modbus RTU communication protocol between two Opta™ devices - -## Required Hardware and Software - -### Hardware Requirements - -- Opta™ PLC with RS-485 support (x2) -- 12VDC/1A DIN rail power supply (x1) -- USB-C® cable (x1) -- Wire with either specification for RS-485 connection (x3): -- STP/UTP 24-18AWG (Unterminated) 100-130Ω rated -- STP/UTP 22-16AWG (Terminated) 100-130Ω rated - -### Software Requirements - -- [Arduino IDE 1.8.10+](https://www.arduino.cc/en/software), [Arduino IDE 2.0+](https://www.arduino.cc/en/software), or [Arduino Web Editor](https://create.arduino.cc/editor) -- If you choose an offline Arduino IDE, you must install the following libraries: `ArduinoRS485`, and `ArduinoModbus`. You can install these libraries via Library Manager of the Arduino IDE. -- [Modbus RTU example code](assets/Opta_Modbus_RTU_Example.zip) - -## Modbus Protocol - -Modbus is an open and royalty-free serial communication protocol derived from the client/server architecture. It is widely used in industrial electronic devices, especially in Building Management Systems (BMS) and Industrial Automation Systems (IAS). - -It was published by Modicon (now Schneider Electric) in 1979 and has become a _de facto_ standard communication protocol among industrial electronic devices to be used with programmable logic controllers (PLCs). - -Modbus communication protocol is often used to connect a supervisory device with a Remote Terminal Unit (RTU) in Supervisory Control and Data Acquisition (SCADA) systems. Reliability in communications between electronic devices is ensured with Modbus by using messages with a simple 16-bit structure with a Cyclic-Redundant Checksum (CRC). - -If you want more insights on the Modbus communication protocol, take a look at [Modbus article](https://docs.arduino.cc/learn/communication/modbus) complying as well with Opta™. - -## Instructions - -### Setting Up the Arduino IDE - -If you haven't already, head over [here](https://www.arduino.cc/en/software) and install the most recent version of the Arduino IDE along with the necessary device drivers for your computer. For additional details on Opta™, check out [getting started tutorial](/tutorials/opta/getting-started). Make sure you install the latest version of the [ArduinoModbus](https://www.arduino.cc/reference/en/libraries/arduinomodbus/) and the [ArduinoRS485](https://www.arduino.cc/reference/en/libraries/arduinors485/) libraries, as they will be used to implement the Modbus RTU communication protocol. - -### Connecting the Opta™ Over RS-485 - -It requires setting up an RS-485 connection to enable the Modbus RTU communication protocol. Refer to the following diagram for connecting two Opta™ devices via the RS-485 interface. - -![Connecting two Opta™ devices via RS-485](assets/opta-modbus-connection.svg) - -### Code Overview - -The goal of the following example is to configure and use the Modbus RTU communication protocol over the RS-485 interface between two Opta™ devices. - -The Modbus is a renowned Client-Server protocol for its reliability. The Modbus Client is responsible as a requesting device, and the Modbus Server provides requested information when available. Several Modbus Servers are allowed, but only one Modbus Client can be present. In this example, an Opta™ Client handles writing and reading `Coil`, `Holding`, `Discrete Input`, and `Input` register values, while an Opta™ Server will poll for Modbus RTU requests and return the appropriate values. - -The crucial components of the code used in this tutorial are discussed in detail in the following sections to make the example easier to understand. - -You can access the complete example code [here](assets/Opta_Modbus_RTU_Example.zip); after extracting the files, `Opta_ModbusRTU_client` and `Opta_ModbusRTU_server` sketches are available to try with your Opta™ devices. - -#### Modbus RTU Client - -The Opta™ Client will require the following setup: - -```arduino -#include -#include // ArduinoModbus depends on the ArduinoRS485 library - -constexpr auto baudrate { 19200 }; - -// Calculate preDelay and postDelay in microseconds as per Modbus RTU Specification -// MODBUS over serial line specification and implementation guide V1.02 -// Paragraph 2.5.1.1 MODBUS Message RTU Framing -// https://modbus.org/docs/Modbus_over_serial_line_V1_02.pdf -constexpr auto bitduration { 1.f / baudrate }; -constexpr auto preDelayBR { bitduration * 9.6f * 3.5f * 1e6 }; -constexpr auto postDelayBR { bitduration * 9.6f * 3.5f * 1e6 }; -// constexpr auto preDelayBR { bitduration * 10.0f * 3.5f * 1e6 }; - -int counter = 0; - -void setup() { - Serial.begin(9600); - while (!Serial); - - Serial.println("Modbus RTU Client"); - - RS485.setDelays(preDelayBR, postDelayBR); - - // Start the Modbus RTU client - if (!ModbusRTUClient.begin(baudrate, SERIAL_8E1)) { - Serial.println("Failed to start Modbus RTU Client!"); - while (1); - } -} -``` - -The `preDelay` and `postDelay` parameters are configured for a proper operation per Modbus RTU specification. The method `RS485.setDelays(preDelayBR, postDelayBR)` is then called to correctly set and use Modbus RTU over RS-485 interface on Opta™. In this example, such parameters are applied based on the message RTU framing specifications explained in depth in this [guide](https://modbus.org/docs/Modbus_over_serial_line_V1_02.pdf). - -The typical baud rates are usually `9600` and `19200`; in the current example, we are using a baud rate of `19200`, but it can be changed depending on the system requirements. For the serial port parameter, `SERIAL_8E1` is used to set 8 data bits, even parity, and one stop bit. - -The Modbus Server can be a module or a sensor with registers that can be accessed using specified addresses to obtain the monitored information or measurements. Inside the loop function of the sketch for the Client device, there are several tasks in charge of reading and writing specific values to access these types of data. Such data are `Coil`, `Holding`, `Discrete Input`, and `Input` register values. - -```arduino -void loop() { - writeCoilValues(); - - readCoilValues(); - - readDiscreteInputValues(); - - writeHoldingRegisterValues(); - - readHoldingRegisterValues(); - - readInputRegisterValues(); - - counter++; - - delay(5000); - Serial.println(); -} -``` - -The complete code for the Client is shown below: - -```arduino -/** - Getting Started with Modbus RTU on Opta™ - Name: Opta_Client - Purpose: Writes Coil and Holding Register values; Reads Coil, Discrete Input, Holding Registers, and Input Register values. - - @author Arduino -*/ - -#include -#include // ArduinoModbus depends on the ArduinoRS485 library - -constexpr auto baudrate { 19200 }; - -// Calculate preDelay and postDelay in microseconds as per Modbus RTU Specification -// MODBUS over serial line specification and implementation guide V1.02 -// Paragraph 2.5.1.1 MODBUS Message RTU Framing -// https://modbus.org/docs/Modbus_over_serial_line_V1_02.pdf -constexpr auto bitduration { 1.f / baudrate }; -constexpr auto preDelayBR { bitduration * 9.6f * 3.5f * 1e6 }; -constexpr auto postDelayBR { bitduration * 9.6f * 3.5f * 1e6 }; -// constexpr auto preDelayBR { bitduration * 10.0f * 3.5f * 1e6 }; - -int counter = 0; - -void setup() { - Serial.begin(9600); - while (!Serial); - - Serial.println("Modbus RTU Client"); - - RS485.setDelays(preDelayBR, postDelayBR); - - // Start the Modbus RTU client - if (!ModbusRTUClient.begin(baudrate, SERIAL_8E1)) { - Serial.println("Failed to start Modbus RTU Client!"); - while (1); - } -} - -void loop() { - writeCoilValues(); - - readCoilValues(); - - readDiscreteInputValues(); - - writeHoldingRegisterValues(); - - readHoldingRegisterValues(); - - readInputRegisterValues(); - - counter++; - - delay(5000); - Serial.println(); -} - -/** - Writes Coil values to the server under specified address. -*/ -void writeCoilValues() { - // Set the coils to 1 when counter is odd - byte coilValue = ((counter % 2) == 0) ? 0x00 : 0x01; - - Serial.print("Writing Coil values ... "); - - // Srite 10 Coil values to (server) id 42, address 0x00 - ModbusRTUClient.beginTransmission(42, COILS, 0x00, 10); - for (int i = 0; i < 10; i++) { - ModbusRTUClient.write(coilValue); - } - if (!ModbusRTUClient.endTransmission()) { - Serial.print("failed! "); - Serial.println(ModbusRTUClient.lastError()); - } else { - Serial.println("success"); - } - - // Alternatively, to write a single Coil value use: - // ModbusRTUClient.coilWrite(...) -} - -/** - Reads Coil values from the server under specified address. -*/ -void readCoilValues() { - Serial.print("Reading Coil values ... "); - - // Read 10 Coil values from (server) id 42, address 0x00 - if (!ModbusRTUClient.requestFrom(42, COILS, 0x00, 10)) { - Serial.print("failed! "); - Serial.println(ModbusRTUClient.lastError()); - } else { - Serial.println("success"); - - while (ModbusRTUClient.available()) { - Serial.print(ModbusRTUClient.read()); - Serial.print(' '); - } - Serial.println(); - } - - // Alternatively, to read a single Coil value use: - // ModbusRTUClient.coilRead(...) -} - -/** - Reads Discrete Input values from the server under specified address. -*/ -void readDiscreteInputValues() { - Serial.print("Reading Discrete Input values ... "); - - // Read 10 Discrete Input values from (server) id 42, address 0x00 - if (!ModbusRTUClient.requestFrom(42, DISCRETE_INPUTS, 0x00, 10)) { - Serial.print("failed! "); - Serial.println(ModbusRTUClient.lastError()); - } else { - Serial.println("success"); - - while (ModbusRTUClient.available()) { - Serial.print(ModbusRTUClient.read()); - Serial.print(' '); - } - Serial.println(); - } - - // Alternatively, to read a single Discrete Input value use: - // ModbusRTUClient.discreteInputRead(...) -} - -/** - Writes Holding Register values to the server under specified address. -*/ -void writeHoldingRegisterValues() { - //Set the Holding Register values to counter - Serial.print("Writing Holding Registers values ... "); - - // Write 10 coil values to (server) id 42, address 0x00 - ModbusRTUClient.beginTransmission(42, HOLDING_REGISTERS, 0x00, 10); - for (int i = 0; i < 10; i++) { - ModbusRTUClient.write(counter); - } - if (!ModbusRTUClient.endTransmission()) { - Serial.print("failed! "); - Serial.println(ModbusRTUClient.lastError()); - } else { - Serial.println("success"); - } - - // Alternatively, to write a single Holding Register value use: - // ModbusRTUClient.holdingRegisterWrite(...) -} - -/** - Reads Holding Register values from the server under specified address. -*/ -void readHoldingRegisterValues() { - Serial.print("Reading Holding Register values ... "); - - // Read 10 Input Register values from (server) id 42, address 0x00 - if (!ModbusRTUClient.requestFrom(42, HOLDING_REGISTERS, 0x00, 10)) { - Serial.print("failed! "); - Serial.println(ModbusRTUClient.lastError()); - } else { - Serial.println("success"); - - while (ModbusRTUClient.available()) { - Serial.print(ModbusRTUClient.read()); - Serial.print(' '); - } - Serial.println(); - } - - // Alternatively, to read a single Holding Register value use: - // ModbusRTUClient.holdingRegisterRead(...) -} - -/** - Reads Input Register values from the server under specified address. -*/ -void readInputRegisterValues() { - Serial.print("Reading input register values ... "); - - // Read 10 discrete input values from (server) id 42, - if (!ModbusRTUClient.requestFrom(42, INPUT_REGISTERS, 0x00, 10)) { - Serial.print("failed! "); - Serial.println(ModbusRTUClient.lastError()); - } else { - Serial.println("success"); - - while (ModbusRTUClient.available()) { - Serial.print(ModbusRTUClient.read()); - Serial.print(' '); - } - Serial.println(); - } - - // Alternatively, to read a single Input Register value use: - // ModbusRTUClient.inputRegisterRead(...) -} -``` - -#### Modbus RTU Server - -In the Opta™ Server, the main task will be to poll for Modbus RTU requests and return configured values when requested. It requires following the same initial configuration as the Opta™ Client. The main difference between the Client and the Server devices lies in the `setup()` function: - -```arduino -#include // ArduinoModbus depends on the ArduinoRS485 library -#include - -constexpr auto baudrate { 19200 }; - -// Calculate preDelay and postDelay in microseconds as per Modbus RTU Specification -// MODBUS over serial line specification and implementation guide V1.02 -// Paragraph 2.5.1.1 MODBUS Message RTU Framing -// https://modbus.org/docs/Modbus_over_serial_line_V1_02.pdf -constexpr auto bitduration { 1.f / baudrate }; -constexpr auto preDelayBR { bitduration * 9.6f * 3.5f * 1e6 }; -constexpr auto postDelayBR { bitduration * 9.6f * 3.5f * 1e6 }; -// constexpr auto preDelayBR { bitduration * 10.0f * 3.5f * 1e6 }; - -const int numCoils = 10; -const int numDiscreteInputs = 10; -const int numHoldingRegisters = 10; -const int numInputRegisters = 10; - -void setup() { - Serial.begin(9600); - while (!Serial); - - Serial.println("Modbus RTU Server"); - - RS485.setDelays(preDelayBR, postDelayBR); - - // Start the Modbus RTU client - if (!ModbusRTUServer.begin(42, baudrate, SERIAL_8E1)) { - Serial.println("Failed to start Modbus RTU Server!"); - - while (1); - } - - // Configure coils at address 0x00 - ModbusRTUServer.configureCoils(0x00, numCoils); - - // Configure discrete inputs at address 0x00 - ModbusRTUServer.configureDiscreteInputs(0x00, numDiscreteInputs); - - // Configure holding registers at address 0x00 - ModbusRTUServer.configureHoldingRegisters(0x00, numHoldingRegisters); - - // Configure input registers at address 0x00 - ModbusRTUServer.configureInputRegisters(0x00, numInputRegisters); -} -``` - -In the `setup()` function of the sketch dedicated to the Modbus server, the Server address is assigned with an identifier that will be recognized by the Client. Also, the initial values of the `Coils`, `Discrete Input`, `Holding`, and `Input` registers are configured. These are the data that the Client will locate and retrieve. The following method is necessary in the Server `loop()` function: - -```arduino -ModbusRTUServer.poll(); -``` - -This is the method that polls for Modbus RTU requests. The complete code for the Server is shown below: - -```arduino -/** - Getting Started with Modbus RTU on Opta™ - Name: Opta_Server - Purpose: Configures Coils, Discrete Inputs, Holding and Input Registers; Polls for Modbus RTU requests and maps the coil values to the Discrete Input values, and Holding Registers to the Input Register values. - - @author Arduino -*/ - -#include // ArduinoModbus depends on the ArduinoRS485 library -#include - -constexpr auto baudrate { 19200 }; - -// Calculate preDelay and postDelay in microseconds as per Modbus RTU Specification -// MODBUS over serial line specification and implementation guide V1.02 -// Paragraph 2.5.1.1 MODBUS Message RTU Framing -// https://modbus.org/docs/Modbus_over_serial_line_V1_02.pdf -constexpr auto bitduration { 1.f / baudrate }; -constexpr auto preDelayBR { bitduration * 9.6f * 3.5f * 1e6 }; -constexpr auto postDelayBR { bitduration * 9.6f * 3.5f * 1e6 }; -// constexpr auto preDelayBR { bitduration * 10.0f * 3.5f * 1e6 }; - -const int numCoils = 10; -const int numDiscreteInputs = 10; -const int numHoldingRegisters = 10; -const int numInputRegisters = 10; - -void setup() { - Serial.begin(9600); - while (!Serial); - - Serial.println("Modbus RTU Server"); - - RS485.setDelays(preDelayBR, postDelayBR); - - // Start the Modbus RTU client - if (!ModbusRTUServer.begin(42, baudrate, SERIAL_8E1)) { - Serial.println("Failed to start Modbus RTU Client!"); - while (1); - } - - // Configure coils at address 0x00 - ModbusRTUServer.configureCoils(0x00, numCoils); - - // Configure discrete inputs at address 0x00 - ModbusRTUServer.configureDiscreteInputs(0x00, numDiscreteInputs); - - // Configure holding registers at address 0x00 - ModbusRTUServer.configureHoldingRegisters(0x00, numHoldingRegisters); - - // Configure input registers at address 0x00 - ModbusRTUServer.configureInputRegisters(0x00, numInputRegisters); -} - -void loop() { - // Poll for Modbus RTU requests - ModbusRTUServer.poll(); - - // Map the coil values to the discrete input values - for (int i = 0; i < numCoils; i++) { - int coilValue = ModbusRTUServer.coilRead(i); - - ModbusRTUServer.discreteInputWrite(i, coilValue); - } - - // Map the holding register values to the input register values - for (int i = 0; i < numHoldingRegisters; i++) { - long holdingRegisterValue = ModbusRTUServer.holdingRegisterRead(i); - - ModbusRTUServer.inputRegisterWrite(i, holdingRegisterValue); - } -} -``` - -### Testing the Modbus RTU Client and Server - -Once the Modbus RTU Client and Server code for each Opta™ device has been uploaded, a `Success!` message will be displayed on the Serial Monitor of Opta™ Client after each read-and-write task: - -![Modbus RTU Client and Server communication status](assets/opta-modbus-client.svg) - -## Conclusion - -This tutorial demonstrates how to use the Arduino ecosystem's `ArduinoRS485` and `ArduinoModbus` libraries, as well as the Arduino IDE, to implement the Modbus RTU protocol between two Opta™ devices. These are necessary elements to enable connection with Modbus RTU compliant devices. - -With the help of these examples, it is easy to understand how to enable Modbus RTU communication between a Server and a Client. For further project developments, it offers a scalable architecture to link additional Modbus Server devices, such as secondary Opta™ or a Modbus RTU-compatible module. - -### Next Steps - +--- +title: 'Getting Started with Modbus RTU on Opta™' +description: "Learn how to use the Modbus RTU serial protocol on Opta™." +author: 'José Bagur and Taddy Chung' +libraries: + - name: 'ArduinoRS485' + url: https://www.arduino.cc/reference/en/libraries/arduinors485 + - name: 'ArduinoModbus' + url: https://www.arduino.cc/reference/en/libraries/arduinomodbus +difficulty: intermediate +tags: + - Getting-started + - ModbusRTU + - RS-485 +software: + - ide-v1 + - ide-v2 + - arduino-cli + - web-editor +hardware: + - hardware/05.pro-solutions/solutions-and-kits/opta +--- + +## Overview + +The **Opta™**, with its industrial hardware and software capabilities, and the Arduino ecosystem tools such as the Arduino IDE and its libraries, provide several types of Modbus communication protocol with effortless implementation thanks to its robust design. + +The Modbus RTU protocol is one of the protocols available within Opta™. In this tutorial, we will learn how to implement Modbus RTU communications protocol over RS-485 between two Opta™ devices. + +## Goals + +- Learn how to establish RS-485 interface connection between two Opta™ devices +- Learn how to use the Modbus RTU communication protocol between two Opta™ devices + +## Required Hardware and Software + +### Hardware Requirements + +- Opta™ PLC with RS-485 support (x2) +- 12VDC/1A DIN rail power supply (x1) +- USB-C® cable (x1) +- Wire with either specification for RS-485 connection (x3): +- STP/UTP 24-18AWG (Unterminated) 100-130Ω rated +- STP/UTP 22-16AWG (Terminated) 100-130Ω rated + +### Software Requirements + +- [Arduino IDE 1.8.10+](https://www.arduino.cc/en/software), [Arduino IDE 2.0+](https://www.arduino.cc/en/software), or [Arduino Web Editor](https://create.arduino.cc/editor) +- If you choose an offline Arduino IDE, you must install the following libraries: `ArduinoRS485`, and `ArduinoModbus`. You can install these libraries via Library Manager of the Arduino IDE. +- [Modbus RTU example code](assets/Opta_Modbus_RTU_Example.zip) + +## Modbus Protocol + +Modbus is an open and royalty-free serial communication protocol derived from the client/server architecture. It is widely used in industrial electronic devices, especially in Building Management Systems (BMS) and Industrial Automation Systems (IAS). + +It was published by Modicon (now Schneider Electric) in 1979 and has become a _de facto_ standard communication protocol among industrial electronic devices to be used with programmable logic controllers (PLCs). + +Modbus communication protocol is often used to connect a supervisory device with a Remote Terminal Unit (RTU) in Supervisory Control and Data Acquisition (SCADA) systems. Reliability in communications between electronic devices is ensured with Modbus by using messages with a simple 16-bit structure with a Cyclic-Redundant Checksum (CRC). + +If you want more insights on the Modbus communication protocol, take a look at [Modbus article](https://docs.arduino.cc/learn/communication/modbus) complying as well with Opta™. + +## Instructions + +### Setting Up the Arduino IDE + +If you haven't already, head over [here](https://www.arduino.cc/en/software) and install the most recent version of the Arduino IDE along with the necessary device drivers for your computer. For additional details on Opta™, check out [getting started tutorial](/tutorials/opta/getting-started). Make sure you install the latest version of the [ArduinoModbus](https://www.arduino.cc/reference/en/libraries/arduinomodbus/) and the [ArduinoRS485](https://www.arduino.cc/reference/en/libraries/arduinors485/) libraries, as they will be used to implement the Modbus RTU communication protocol. + +### Connecting the Opta™ Over RS-485 + +It requires setting up an RS-485 connection to enable the Modbus RTU communication protocol. Refer to the following diagram for connecting two Opta™ devices via the RS-485 interface. + +![Connecting two Opta™ devices via RS-485](assets/opta-modbus-connection.svg) + +### Code Overview + +The goal of the following example is to configure and use the Modbus RTU communication protocol over the RS-485 interface between two Opta™ devices. + +The Modbus is a renowned Client-Server protocol for its reliability. The Modbus Client is responsible as a requesting device, and the Modbus Server provides requested information when available. Several Modbus Servers are allowed, but only one Modbus Client can be present. In this example, an Opta™ Client handles writing and reading `Coil`, `Holding`, `Discrete Input`, and `Input` register values, while an Opta™ Server will poll for Modbus RTU requests and return the appropriate values. + +The crucial components of the code used in this tutorial are discussed in detail in the following sections to make the example easier to understand. + +You can access the complete example code [here](assets/Opta_Modbus_RTU_Example.zip); after extracting the files, `Opta_ModbusRTU_client` and `Opta_ModbusRTU_server` sketches are available to try with your Opta™ devices. + +#### Modbus RTU Client + +The Opta™ Client will require the following setup: + +```arduino +#include +#include // ArduinoModbus depends on the ArduinoRS485 library + +constexpr auto baudrate { 19200 }; + +// Calculate preDelay and postDelay in microseconds as per Modbus RTU Specification +// MODBUS over serial line specification and implementation guide V1.02 +// Paragraph 2.5.1.1 MODBUS Message RTU Framing +// https://modbus.org/docs/Modbus_over_serial_line_V1_02.pdf +constexpr auto bitduration { 1.f / baudrate }; +constexpr auto preDelayBR { bitduration * 9.6f * 3.5f * 1e6 }; +constexpr auto postDelayBR { bitduration * 9.6f * 3.5f * 1e6 }; +// constexpr auto preDelayBR { bitduration * 10.0f * 3.5f * 1e6 }; + +int counter = 0; + +void setup() { + Serial.begin(9600); + while (!Serial); + + Serial.println("Modbus RTU Client"); + + RS485.setDelays(preDelayBR, postDelayBR); + + // Start the Modbus RTU client + if (!ModbusRTUClient.begin(baudrate, SERIAL_8E1)) { + Serial.println("Failed to start Modbus RTU Client!"); + while (1); + } +} +``` + +The `preDelay` and `postDelay` parameters are configured for a proper operation per Modbus RTU specification. The method `RS485.setDelays(preDelayBR, postDelayBR)` is then called to correctly set and use Modbus RTU over RS-485 interface on Opta™. In this example, such parameters are applied based on the message RTU framing specifications explained in depth in this [guide](https://modbus.org/docs/Modbus_over_serial_line_V1_02.pdf). + +The typical baud rates are usually `9600` and `19200`; in the current example, we are using a baud rate of `19200`, but it can be changed depending on the system requirements. For the serial port parameter, `SERIAL_8E1` is used to set 8 data bits, even parity, and one stop bit. + +The Modbus Server can be a module or a sensor with registers that can be accessed using specified addresses to obtain the monitored information or measurements. Inside the loop function of the sketch for the Client device, there are several tasks in charge of reading and writing specific values to access these types of data. Such data are `Coil`, `Holding`, `Discrete Input`, and `Input` register values. + +```arduino +void loop() { + writeCoilValues(); + + readCoilValues(); + + readDiscreteInputValues(); + + writeHoldingRegisterValues(); + + readHoldingRegisterValues(); + + readInputRegisterValues(); + + counter++; + + delay(5000); + Serial.println(); +} +``` + +The complete code for the Client is shown below: + +```arduino +/** + Getting Started with Modbus RTU on Opta™ + Name: Opta_Client + Purpose: Writes Coil and Holding Register values; Reads Coil, Discrete Input, Holding Registers, and Input Register values. + + @author Arduino +*/ + +#include +#include // ArduinoModbus depends on the ArduinoRS485 library + +constexpr auto baudrate { 19200 }; + +// Calculate preDelay and postDelay in microseconds as per Modbus RTU Specification +// MODBUS over serial line specification and implementation guide V1.02 +// Paragraph 2.5.1.1 MODBUS Message RTU Framing +// https://modbus.org/docs/Modbus_over_serial_line_V1_02.pdf +constexpr auto bitduration { 1.f / baudrate }; +constexpr auto preDelayBR { bitduration * 9.6f * 3.5f * 1e6 }; +constexpr auto postDelayBR { bitduration * 9.6f * 3.5f * 1e6 }; +// constexpr auto preDelayBR { bitduration * 10.0f * 3.5f * 1e6 }; + +int counter = 0; + +void setup() { + Serial.begin(9600); + while (!Serial); + + Serial.println("Modbus RTU Client"); + + RS485.setDelays(preDelayBR, postDelayBR); + + // Start the Modbus RTU client + if (!ModbusRTUClient.begin(baudrate, SERIAL_8E1)) { + Serial.println("Failed to start Modbus RTU Client!"); + while (1); + } +} + +void loop() { + writeCoilValues(); + + readCoilValues(); + + readDiscreteInputValues(); + + writeHoldingRegisterValues(); + + readHoldingRegisterValues(); + + readInputRegisterValues(); + + counter++; + + delay(5000); + Serial.println(); +} + +/** + Writes Coil values to the server under specified address. +*/ +void writeCoilValues() { + // Set the coils to 1 when counter is odd + byte coilValue = ((counter % 2) == 0) ? 0x00 : 0x01; + + Serial.print("Writing Coil values ... "); + + // Srite 10 Coil values to (server) id 42, address 0x00 + ModbusRTUClient.beginTransmission(42, COILS, 0x00, 10); + for (int i = 0; i < 10; i++) { + ModbusRTUClient.write(coilValue); + } + if (!ModbusRTUClient.endTransmission()) { + Serial.print("failed! "); + Serial.println(ModbusRTUClient.lastError()); + } else { + Serial.println("success"); + } + + // Alternatively, to write a single Coil value use: + // ModbusRTUClient.coilWrite(...) +} + +/** + Reads Coil values from the server under specified address. +*/ +void readCoilValues() { + Serial.print("Reading Coil values ... "); + + // Read 10 Coil values from (server) id 42, address 0x00 + if (!ModbusRTUClient.requestFrom(42, COILS, 0x00, 10)) { + Serial.print("failed! "); + Serial.println(ModbusRTUClient.lastError()); + } else { + Serial.println("success"); + + while (ModbusRTUClient.available()) { + Serial.print(ModbusRTUClient.read()); + Serial.print(' '); + } + Serial.println(); + } + + // Alternatively, to read a single Coil value use: + // ModbusRTUClient.coilRead(...) +} + +/** + Reads Discrete Input values from the server under specified address. +*/ +void readDiscreteInputValues() { + Serial.print("Reading Discrete Input values ... "); + + // Read 10 Discrete Input values from (server) id 42, address 0x00 + if (!ModbusRTUClient.requestFrom(42, DISCRETE_INPUTS, 0x00, 10)) { + Serial.print("failed! "); + Serial.println(ModbusRTUClient.lastError()); + } else { + Serial.println("success"); + + while (ModbusRTUClient.available()) { + Serial.print(ModbusRTUClient.read()); + Serial.print(' '); + } + Serial.println(); + } + + // Alternatively, to read a single Discrete Input value use: + // ModbusRTUClient.discreteInputRead(...) +} + +/** + Writes Holding Register values to the server under specified address. +*/ +void writeHoldingRegisterValues() { + //Set the Holding Register values to counter + Serial.print("Writing Holding Registers values ... "); + + // Write 10 coil values to (server) id 42, address 0x00 + ModbusRTUClient.beginTransmission(42, HOLDING_REGISTERS, 0x00, 10); + for (int i = 0; i < 10; i++) { + ModbusRTUClient.write(counter); + } + if (!ModbusRTUClient.endTransmission()) { + Serial.print("failed! "); + Serial.println(ModbusRTUClient.lastError()); + } else { + Serial.println("success"); + } + + // Alternatively, to write a single Holding Register value use: + // ModbusRTUClient.holdingRegisterWrite(...) +} + +/** + Reads Holding Register values from the server under specified address. +*/ +void readHoldingRegisterValues() { + Serial.print("Reading Holding Register values ... "); + + // Read 10 Input Register values from (server) id 42, address 0x00 + if (!ModbusRTUClient.requestFrom(42, HOLDING_REGISTERS, 0x00, 10)) { + Serial.print("failed! "); + Serial.println(ModbusRTUClient.lastError()); + } else { + Serial.println("success"); + + while (ModbusRTUClient.available()) { + Serial.print(ModbusRTUClient.read()); + Serial.print(' '); + } + Serial.println(); + } + + // Alternatively, to read a single Holding Register value use: + // ModbusRTUClient.holdingRegisterRead(...) +} + +/** + Reads Input Register values from the server under specified address. +*/ +void readInputRegisterValues() { + Serial.print("Reading input register values ... "); + + // Read 10 discrete input values from (server) id 42, + if (!ModbusRTUClient.requestFrom(42, INPUT_REGISTERS, 0x00, 10)) { + Serial.print("failed! "); + Serial.println(ModbusRTUClient.lastError()); + } else { + Serial.println("success"); + + while (ModbusRTUClient.available()) { + Serial.print(ModbusRTUClient.read()); + Serial.print(' '); + } + Serial.println(); + } + + // Alternatively, to read a single Input Register value use: + // ModbusRTUClient.inputRegisterRead(...) +} +``` + +#### Modbus RTU Server + +In the Opta™ Server, the main task will be to poll for Modbus RTU requests and return configured values when requested. It requires following the same initial configuration as the Opta™ Client. The main difference between the Client and the Server devices lies in the `setup()` function: + +```arduino +#include // ArduinoModbus depends on the ArduinoRS485 library +#include + +constexpr auto baudrate { 19200 }; + +// Calculate preDelay and postDelay in microseconds as per Modbus RTU Specification +// MODBUS over serial line specification and implementation guide V1.02 +// Paragraph 2.5.1.1 MODBUS Message RTU Framing +// https://modbus.org/docs/Modbus_over_serial_line_V1_02.pdf +constexpr auto bitduration { 1.f / baudrate }; +constexpr auto preDelayBR { bitduration * 9.6f * 3.5f * 1e6 }; +constexpr auto postDelayBR { bitduration * 9.6f * 3.5f * 1e6 }; +// constexpr auto preDelayBR { bitduration * 10.0f * 3.5f * 1e6 }; + +const int numCoils = 10; +const int numDiscreteInputs = 10; +const int numHoldingRegisters = 10; +const int numInputRegisters = 10; + +void setup() { + Serial.begin(9600); + while (!Serial); + + Serial.println("Modbus RTU Server"); + + RS485.setDelays(preDelayBR, postDelayBR); + + // Start the Modbus RTU client + if (!ModbusRTUServer.begin(42, baudrate, SERIAL_8E1)) { + Serial.println("Failed to start Modbus RTU Server!"); + + while (1); + } + + // Configure coils at address 0x00 + ModbusRTUServer.configureCoils(0x00, numCoils); + + // Configure discrete inputs at address 0x00 + ModbusRTUServer.configureDiscreteInputs(0x00, numDiscreteInputs); + + // Configure holding registers at address 0x00 + ModbusRTUServer.configureHoldingRegisters(0x00, numHoldingRegisters); + + // Configure input registers at address 0x00 + ModbusRTUServer.configureInputRegisters(0x00, numInputRegisters); +} +``` + +In the `setup()` function of the sketch dedicated to the Modbus server, the Server address is assigned with an identifier that will be recognized by the Client. Also, the initial values of the `Coils`, `Discrete Input`, `Holding`, and `Input` registers are configured. These are the data that the Client will locate and retrieve. The following method is necessary in the Server `loop()` function: + +```arduino +ModbusRTUServer.poll(); +``` + +This is the method that polls for Modbus RTU requests. The complete code for the Server is shown below: + +```arduino +/** + Getting Started with Modbus RTU on Opta™ + Name: Opta_Server + Purpose: Configures Coils, Discrete Inputs, Holding and Input Registers; Polls for Modbus RTU requests and maps the coil values to the Discrete Input values, and Holding Registers to the Input Register values. + + @author Arduino +*/ + +#include // ArduinoModbus depends on the ArduinoRS485 library +#include + +constexpr auto baudrate { 19200 }; + +// Calculate preDelay and postDelay in microseconds as per Modbus RTU Specification +// MODBUS over serial line specification and implementation guide V1.02 +// Paragraph 2.5.1.1 MODBUS Message RTU Framing +// https://modbus.org/docs/Modbus_over_serial_line_V1_02.pdf +constexpr auto bitduration { 1.f / baudrate }; +constexpr auto preDelayBR { bitduration * 9.6f * 3.5f * 1e6 }; +constexpr auto postDelayBR { bitduration * 9.6f * 3.5f * 1e6 }; +// constexpr auto preDelayBR { bitduration * 10.0f * 3.5f * 1e6 }; + +const int numCoils = 10; +const int numDiscreteInputs = 10; +const int numHoldingRegisters = 10; +const int numInputRegisters = 10; + +void setup() { + Serial.begin(9600); + while (!Serial); + + Serial.println("Modbus RTU Server"); + + RS485.setDelays(preDelayBR, postDelayBR); + + // Start the Modbus RTU client + if (!ModbusRTUServer.begin(42, baudrate, SERIAL_8E1)) { + Serial.println("Failed to start Modbus RTU Client!"); + while (1); + } + + // Configure coils at address 0x00 + ModbusRTUServer.configureCoils(0x00, numCoils); + + // Configure discrete inputs at address 0x00 + ModbusRTUServer.configureDiscreteInputs(0x00, numDiscreteInputs); + + // Configure holding registers at address 0x00 + ModbusRTUServer.configureHoldingRegisters(0x00, numHoldingRegisters); + + // Configure input registers at address 0x00 + ModbusRTUServer.configureInputRegisters(0x00, numInputRegisters); +} + +void loop() { + // Poll for Modbus RTU requests + ModbusRTUServer.poll(); + + // Map the coil values to the discrete input values + for (int i = 0; i < numCoils; i++) { + int coilValue = ModbusRTUServer.coilRead(i); + + ModbusRTUServer.discreteInputWrite(i, coilValue); + } + + // Map the holding register values to the input register values + for (int i = 0; i < numHoldingRegisters; i++) { + long holdingRegisterValue = ModbusRTUServer.holdingRegisterRead(i); + + ModbusRTUServer.inputRegisterWrite(i, holdingRegisterValue); + } +} +``` + +### Testing the Modbus RTU Client and Server + +Once the Modbus RTU Client and Server code for each Opta™ device has been uploaded, a `Success!` message will be displayed on the Serial Monitor of Opta™ Client after each read-and-write task: + +![Modbus RTU Client and Server communication status](assets/opta-modbus-client.svg) + +## Conclusion + +This tutorial demonstrates how to use the Arduino ecosystem's `ArduinoRS485` and `ArduinoModbus` libraries, as well as the Arduino IDE, to implement the Modbus RTU protocol between two Opta™ devices. These are necessary elements to enable connection with Modbus RTU compliant devices. + +With the help of these examples, it is easy to understand how to enable Modbus RTU communication between a Server and a Client. For further project developments, it offers a scalable architecture to link additional Modbus Server devices, such as secondary Opta™ or a Modbus RTU-compatible module. + +### Next Steps + Now that you know how to establish and use Modbus RTU communication with Opta™, you can take a look at [Getting started with connectivity on the Opta™ tutorial](/tutorials/opta/getting-started-connectivity) to discover more about all the connectivity possibilities that Opta™ has to offer. \ No newline at end of file diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-with-rs485/assets/Opta_RS485_Example.zip b/content/hardware/07.opta/opta-family/opta/tutorials/getting-started-with-rs485/assets/Opta_RS485_Example.zip similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-with-rs485/assets/Opta_RS485_Example.zip rename to content/hardware/07.opta/opta-family/opta/tutorials/getting-started-with-rs485/assets/Opta_RS485_Example.zip diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-with-rs485/assets/opta-modbus-connection.svg b/content/hardware/07.opta/opta-family/opta/tutorials/getting-started-with-rs485/assets/opta-modbus-connection.svg similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-with-rs485/assets/opta-modbus-connection.svg rename to content/hardware/07.opta/opta-family/opta/tutorials/getting-started-with-rs485/assets/opta-modbus-connection.svg diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-with-rs485/content.md b/content/hardware/07.opta/opta-family/opta/tutorials/getting-started-with-rs485/content.md similarity index 98% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-with-rs485/content.md rename to content/hardware/07.opta/opta-family/opta/tutorials/getting-started-with-rs485/content.md index 58fcdb2613..c20743cbb7 100644 --- a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-with-rs485/content.md +++ b/content/hardware/07.opta/opta-family/opta/tutorials/getting-started-with-rs485/content.md @@ -1,231 +1,231 @@ ---- -title: 'Getting Started with RS-485 on Opta™' -description: "Learn how to make use of the RS-485 communication interface on Opta™." -difficulty: beginner -tags: - - Getting started - - RS-485 -author: 'Benjamin Dannegård and Taddy Chung' -libraries: - - name: ArduinoRS485 - url: https://www.arduino.cc/reference/en/libraries/arduinors485/ -software: - - ide-v1 - - ide-v2 -hardware: - - hardware/05.pro-solutions/solutions-and-kits/opta ---- - -## Overview - -The Opta™ micro PLC offers an easy-to-use and readily-available RS-485 interface. The RS-485 interface provides balanced performance to transmit data reliably over a long distance, with a stable transmission rate. Thanks to the Arduino ecosystem tools, such as the [Arduino IDE](https://www.arduino.cc/en/software) and the [ArduinoRS485 library](https://www.arduino.cc/reference/en/libraries/arduinors485/), it is really easy to implement communication protocols using the RS-485 interface. - -This tutorial will show the steps to connect two Opta™ devices via RS-485 and the Arduino ecosystem tools; it will describe some essential functions of the [ArduinoRS485](https://www.arduino.cc/reference/en/libraries/arduinors485/) library and show an [example sketch](assets/Opta_RS485_Example.zip) that uses the library. - -## Goals - -- Learn how to connect two Opta™ devices through the RS-485 interface -- Learn how to exchange information between two Opta™ devices through the RS-485 interface and use it to control the onboard features of the Opta™ - -### Required Hardware and Software - -- Opta™ PLC with RS-485 support (x2) -- 12-24VDC/1A power supply (x1) -- 24AWG twisted-pair cable (used for electrical connections) -- USB-C® cable (x1) -- [Arduino IDE 1.8.10+](https://www.arduino.cc/en/software), [Arduino IDE 2.0+](https://www.arduino.cc/en/software), or [Arduino Web Editor](https://create.arduino.cc/editor) -- [ArduinoRS485 library](https://www.arduino.cc/reference/en/libraries/arduinors485/) -- [RS-485 example code](assets/Opta_RS485_Example.zip) - -***Notice: Please note that this tutorial is intended to work only with the Opta™ variants that have an RS-485 interface. Check your product information to know more.*** - -## The RS-485 Interface - -The RS-485 is an electrical standard using a differential bus with voltage levels between 0-5V. The multi-drop feature allows the addition of drivers and receivers to the transmission line. The RS-485 interface has good noise immunity thanks to the differential signaling, which is a well-suited characteristic for industrial environment applications. - -The RS-485 does not define a data communication protocol since it does not know how to interpret such information nor when or what to do to process it: it is only an electrical standard. An example of a data communication protocol using RS-485 is Modbus RTU. For more information about this data communication protocol, you can check our [getting started with Modbus RTU tutorial](/tutorials/opta/getting-started-with-modbus-rtu) with the Opta™. - -## Instructions - -### Setting up the Arduino IDE - -This tutorial will need the latest version of the Arduino IDE. You can download the Arduino IDE [here](https://www.arduino.cc/en/software). Please check the [getting started with the Opta™ tutorial](/tutorials/opta/getting-started) if it is your first time setting up the Opta™ with the Arduino IDE. - -The [ArduinoRS485 library](https://www.arduino.cc/reference/en/libraries/arduinors485/) will be used to simplify the use of RS-485 communication interface on Opta™. This library can be installed via Arduino IDE Library Manager; make sure to install the latest version of the library. - -### The RS-485 Interface in Opta™ - -Please refer to the following diagram for connecting two Opta™ devices via their RS-485 interface. The figure also indicates other onboard features of the Opta™, such as its status LEDs and relays which will be used during the tutorial. - -![Connection of two Opta™ devices via RS-485](assets/opta-modbus-connection.svg) - -### Example Overview - -We will define one Opta™ as sender and the other as receiver device. As the roles suggest, each Opta™ has a specific task. In the case of the Opta™ acting as sender, the device will await for data from `1` to `4` via the serial monitor. The Arduino IDE provides a serial monitor that can be used for this task. Each number represents the relay to trigger and its corresponding status LED. - -The Opta™ acting as receiver will get the incoming data, decode them, and discard non-valid or out-of-range data. The decoded data will switch the relay state and the status LED to the opposite of the current state. For instance, if the receiver captures a `2` from the sender while the receiver has its 2nd relay closed with a turned-on 2nd status LED, the receiver will open the relay and turn off the 2nd status LED as a deactivation indication. - -The other way around, in case of an open relay/LED off status, Opta™ will close the relay and turn on the status LED corresponding to the number received in the recent transmission. The same occurs for all the pairs of relays/status LEDs. - -### The Opta™ Sender Sketch - -The first step to do is to define the RS-485 transmission parameters: - -```arduino -#include - -constexpr auto baudrate{ 115200 }; - -// Calculate preDelay and postDelay in microseconds for stable RS-485 transmission -constexpr auto bitduration{ 1.f / baudrate }; -constexpr auto wordlen{ 9.6f }; // OR 10.0f depending on the channel configuration -constexpr auto preDelayBR{ bitduration * wordlen * 3.5f * 1e6 }; -constexpr auto postDelayBR{ bitduration * wordlen * 3.5f * 1e6 }; -``` - -These transmission parameters, applied in the Opta™ initialization, are crucial for a stable RS-485 data transmission as they will define the communication timings to make sure the lines of the RS-485 are already in a stable state. **Remember that it is necessary to have a matching baud rate between the sender and the receiver devices for stable operation**. In this tutorial, we are using a baud rate of `115200`, but it can be configured at a different baud rate: - -```arduino -void setup() { - Serial.begin(baudrate); - while (!Serial); - - RS485.begin(baudrate); - RS485.setDelays(preDelayBR, postDelayBR); -} -``` - -The sender's job is to pack and transmit data to the receiver. Inside the main loop of the sketch, the sender will capture input data from the serial port and write the data after a series of checks to avoid sending incorrect data. Before converting the data to an integer, it is necessary to discard the end-of-line (EOL) as shown in the sketch. - -The `RS485.beginTransmission()` method enables the RS-485 transmission. Subsequently, the `RS485.write(incomingByte)` method sends data as a byte or a series of bytes by writing their binary data to the serial port. In this case, we are sending to the receiver the `incomingByte` variable that contains the input data converted to an integer. The `RS485.endTransmission()` method then ends the RS-485 transmission, finishing the operation cycle. - -```arduino -void loop() { - auto aval = Serial.available(); - if (aval > 0) { - auto input = Serial.readStringUntil('\r'); - - // Discard EOL - auto read = input.length(); - while (aval > ++read) - Serial.read(); - - auto incomingByte = input.toInt(); - RS485.beginTransmission(); - Serial.print("- Sending: "); - Serial.println(incomingByte); - RS485.write(incomingByte); - RS485.endTransmission(); - } -} -``` - -### The Opta™ Receiver Sketch - -The receiver has the same configuration as the sender. Although, since it needs to trigger the relays with their corresponding status LEDs based on the received data, it also configures the relays, built-in LEDs, and their status: - -```arduino -int idx{ 0 }; -bool newState{ false }; - -int relays[]{ D0, D1, D2, D3 }; -int leds[]{ LED_D0, LED_D1, LED_D2, LED_D3 }; -bool statuses[]{ true, true, true, true }; -``` - -After initializing the RS-485 interface, the relays and the status LEDs are set as `OUTPUTS`. It will later help to control the relay with its corresponding visual indicator based on the received data over the RS-485: - -```arduino -void setup() { - for (int i = 0; i < 4; i++) { - pinMode(relays[i], OUTPUT); - pinMode(leds[i], OUTPUT); - } - - RS485.begin(baudrate); - RS485.setDelays(preDelayBR, postDelayBR); - - Serial.begin(baudrate); - while (!Serial); -} -``` - -In the main loop of the sketch, we will seek data sent over RS-485 and handle them accordingly. The loop manages out-of-range inputs and considers in-range data for the actuation of the intended relay and status LED. If the sender device forwards values that are not between `1` and `4`, the `readValue` variable will go through a module operation and return the remainder from the integer division to use as a correct input. - -The `RS485.receive()` method enables the data reception via RS-485, then the `RS485.available()` method is used to determine if there are data available to be read. Once the data are available, the `RS485.read()` method will read the data and store them in the `readValue` variable. Finally, after managing the received data, the `RS485.noReceive()` method is called to disable the data reception over RS-485: - -```arduino -void loop() { - - RS485.receive(); - auto aval = RS485.available(); - if (aval > 0) { - int readValue = RS485.read(); - - // Manage out-of-range inputs - if (readValue > 4) - readValue = readValue % 4; - - Serial.print("Command for relay: "); - Serial.println(readValue); - newState = true; - - // Array indexes start at 0 - idx = readValue - 1; - } - RS485.noReceive(); - - if (newState) { - changeRelay(); - newState = false; - } -} -``` - -The `changeRelay()` function manages the relay and status LED state based on the received input packet. This function is called after receiving data via RS-485 to update the relay and status LED states accordingly: - -```arduino -/** - Changes relay and status LED state given the received value. -*/ -void changeRelay() { - // Get current status - auto status = statuses[idx] ? HIGH : LOW; - - // Apply new status to the outputs - digitalWrite(relays[idx], status); - digitalWrite(leds[idx], status); - - // Invert the statuses array to be updated - statuses[idx] = !statuses[idx]; -} -``` - -### Full Example Code - -You can access the complete example code [here](assets/Opta_RS485_Example.zip); after extracting the files, `Opta_RS485_Sender` and `Opta_RS485_Receiver` sketches are available to try with your Opta™ devices. - -### Testing Out the Sketches - -Now it is time to test the application. Using the Serial Monitor of the Arduino IDE, send a value between `1` and `4` with the sender device. Sending a `1` will close the 1st relay and turn on the corresponding status LED of the receiver Opta™ device. Sending a `1` again will open the 1st relay and turn off the status LED of the receiver device. - -Here is a list of the values the receiver Opta™ device can receive and the result they produce: - -- **Sending `1`**: The first relay and the first status LED will turn on or off -- **Sending `2`**: The second relay and the second status LED will turn on or off -- **Sending `3`**: The third relay and the third status LED will turn on or off -- **Sending `4`**: The fourth relay and the fourth status LED will turn on or off - -## Conclusion - -In this tutorial, we established an RS-485 connection between two Opta™ devices. We also learned how to use the `ArduinoRS485.h` library to send and receive values between these two devices using RS-485 layer. Finally, the tutorial showed how to take the data sent via RS-485 to interact with the Opta™ PLC's hardware features, such as its onboard relays and status LEDs. - -### Next Steps - -Now that you are familiar with the RS-485 communication interface on the Opta™, take a look at the following documentation to learn more: - -* Take a look at [getting started tutorial](/tutorials/opta/getting-started) to get a better overview of the features of Opta™ - -* If you wish to incorporate Wi-Fi®/Bluetooth® Low Energy in your Opta™ solutions, have a look at [connectivity tutorial](/tutorials/opta/getting-started-connectivity) - -* If you are interested in seeing the RS-485 interface and the Opta™ being put to work in a real-life scenario, check the [tank level application note](/tutorials/opta/tank-level-app-note) +--- +title: 'Getting Started with RS-485 on Opta™' +description: "Learn how to make use of the RS-485 communication interface on Opta™." +difficulty: beginner +tags: + - Getting started + - RS-485 +author: 'Benjamin Dannegård and Taddy Chung' +libraries: + - name: ArduinoRS485 + url: https://www.arduino.cc/reference/en/libraries/arduinors485/ +software: + - ide-v1 + - ide-v2 +hardware: + - hardware/05.pro-solutions/solutions-and-kits/opta +--- + +## Overview + +The Opta™ micro PLC offers an easy-to-use and readily-available RS-485 interface. The RS-485 interface provides balanced performance to transmit data reliably over a long distance, with a stable transmission rate. Thanks to the Arduino ecosystem tools, such as the [Arduino IDE](https://www.arduino.cc/en/software) and the [ArduinoRS485 library](https://www.arduino.cc/reference/en/libraries/arduinors485/), it is really easy to implement communication protocols using the RS-485 interface. + +This tutorial will show the steps to connect two Opta™ devices via RS-485 and the Arduino ecosystem tools; it will describe some essential functions of the [ArduinoRS485](https://www.arduino.cc/reference/en/libraries/arduinors485/) library and show an [example sketch](assets/Opta_RS485_Example.zip) that uses the library. + +## Goals + +- Learn how to connect two Opta™ devices through the RS-485 interface +- Learn how to exchange information between two Opta™ devices through the RS-485 interface and use it to control the onboard features of the Opta™ + +### Required Hardware and Software + +- Opta™ PLC with RS-485 support (x2) +- 12-24VDC/1A power supply (x1) +- 24AWG twisted-pair cable (used for electrical connections) +- USB-C® cable (x1) +- [Arduino IDE 1.8.10+](https://www.arduino.cc/en/software), [Arduino IDE 2.0+](https://www.arduino.cc/en/software), or [Arduino Web Editor](https://create.arduino.cc/editor) +- [ArduinoRS485 library](https://www.arduino.cc/reference/en/libraries/arduinors485/) +- [RS-485 example code](assets/Opta_RS485_Example.zip) + +***Notice: Please note that this tutorial is intended to work only with the Opta™ variants that have an RS-485 interface. Check your product information to know more.*** + +## The RS-485 Interface + +The RS-485 is an electrical standard using a differential bus with voltage levels between 0-5V. The multi-drop feature allows the addition of drivers and receivers to the transmission line. The RS-485 interface has good noise immunity thanks to the differential signaling, which is a well-suited characteristic for industrial environment applications. + +The RS-485 does not define a data communication protocol since it does not know how to interpret such information nor when or what to do to process it: it is only an electrical standard. An example of a data communication protocol using RS-485 is Modbus RTU. For more information about this data communication protocol, you can check our [getting started with Modbus RTU tutorial](/tutorials/opta/getting-started-with-modbus-rtu) with the Opta™. + +## Instructions + +### Setting up the Arduino IDE + +This tutorial will need the latest version of the Arduino IDE. You can download the Arduino IDE [here](https://www.arduino.cc/en/software). Please check the [getting started with the Opta™ tutorial](/tutorials/opta/getting-started) if it is your first time setting up the Opta™ with the Arduino IDE. + +The [ArduinoRS485 library](https://www.arduino.cc/reference/en/libraries/arduinors485/) will be used to simplify the use of RS-485 communication interface on Opta™. This library can be installed via Arduino IDE Library Manager; make sure to install the latest version of the library. + +### The RS-485 Interface in Opta™ + +Please refer to the following diagram for connecting two Opta™ devices via their RS-485 interface. The figure also indicates other onboard features of the Opta™, such as its status LEDs and relays which will be used during the tutorial. + +![Connection of two Opta™ devices via RS-485](assets/opta-modbus-connection.svg) + +### Example Overview + +We will define one Opta™ as sender and the other as receiver device. As the roles suggest, each Opta™ has a specific task. In the case of the Opta™ acting as sender, the device will await for data from `1` to `4` via the serial monitor. The Arduino IDE provides a serial monitor that can be used for this task. Each number represents the relay to trigger and its corresponding status LED. + +The Opta™ acting as receiver will get the incoming data, decode them, and discard non-valid or out-of-range data. The decoded data will switch the relay state and the status LED to the opposite of the current state. For instance, if the receiver captures a `2` from the sender while the receiver has its 2nd relay closed with a turned-on 2nd status LED, the receiver will open the relay and turn off the 2nd status LED as a deactivation indication. + +The other way around, in case of an open relay/LED off status, Opta™ will close the relay and turn on the status LED corresponding to the number received in the recent transmission. The same occurs for all the pairs of relays/status LEDs. + +### The Opta™ Sender Sketch + +The first step to do is to define the RS-485 transmission parameters: + +```arduino +#include + +constexpr auto baudrate{ 115200 }; + +// Calculate preDelay and postDelay in microseconds for stable RS-485 transmission +constexpr auto bitduration{ 1.f / baudrate }; +constexpr auto wordlen{ 9.6f }; // OR 10.0f depending on the channel configuration +constexpr auto preDelayBR{ bitduration * wordlen * 3.5f * 1e6 }; +constexpr auto postDelayBR{ bitduration * wordlen * 3.5f * 1e6 }; +``` + +These transmission parameters, applied in the Opta™ initialization, are crucial for a stable RS-485 data transmission as they will define the communication timings to make sure the lines of the RS-485 are already in a stable state. **Remember that it is necessary to have a matching baud rate between the sender and the receiver devices for stable operation**. In this tutorial, we are using a baud rate of `115200`, but it can be configured at a different baud rate: + +```arduino +void setup() { + Serial.begin(baudrate); + while (!Serial); + + RS485.begin(baudrate); + RS485.setDelays(preDelayBR, postDelayBR); +} +``` + +The sender's job is to pack and transmit data to the receiver. Inside the main loop of the sketch, the sender will capture input data from the serial port and write the data after a series of checks to avoid sending incorrect data. Before converting the data to an integer, it is necessary to discard the end-of-line (EOL) as shown in the sketch. + +The `RS485.beginTransmission()` method enables the RS-485 transmission. Subsequently, the `RS485.write(incomingByte)` method sends data as a byte or a series of bytes by writing their binary data to the serial port. In this case, we are sending to the receiver the `incomingByte` variable that contains the input data converted to an integer. The `RS485.endTransmission()` method then ends the RS-485 transmission, finishing the operation cycle. + +```arduino +void loop() { + auto aval = Serial.available(); + if (aval > 0) { + auto input = Serial.readStringUntil('\r'); + + // Discard EOL + auto read = input.length(); + while (aval > ++read) + Serial.read(); + + auto incomingByte = input.toInt(); + RS485.beginTransmission(); + Serial.print("- Sending: "); + Serial.println(incomingByte); + RS485.write(incomingByte); + RS485.endTransmission(); + } +} +``` + +### The Opta™ Receiver Sketch + +The receiver has the same configuration as the sender. Although, since it needs to trigger the relays with their corresponding status LEDs based on the received data, it also configures the relays, built-in LEDs, and their status: + +```arduino +int idx{ 0 }; +bool newState{ false }; + +int relays[]{ D0, D1, D2, D3 }; +int leds[]{ LED_D0, LED_D1, LED_D2, LED_D3 }; +bool statuses[]{ true, true, true, true }; +``` + +After initializing the RS-485 interface, the relays and the status LEDs are set as `OUTPUTS`. It will later help to control the relay with its corresponding visual indicator based on the received data over the RS-485: + +```arduino +void setup() { + for (int i = 0; i < 4; i++) { + pinMode(relays[i], OUTPUT); + pinMode(leds[i], OUTPUT); + } + + RS485.begin(baudrate); + RS485.setDelays(preDelayBR, postDelayBR); + + Serial.begin(baudrate); + while (!Serial); +} +``` + +In the main loop of the sketch, we will seek data sent over RS-485 and handle them accordingly. The loop manages out-of-range inputs and considers in-range data for the actuation of the intended relay and status LED. If the sender device forwards values that are not between `1` and `4`, the `readValue` variable will go through a module operation and return the remainder from the integer division to use as a correct input. + +The `RS485.receive()` method enables the data reception via RS-485, then the `RS485.available()` method is used to determine if there are data available to be read. Once the data are available, the `RS485.read()` method will read the data and store them in the `readValue` variable. Finally, after managing the received data, the `RS485.noReceive()` method is called to disable the data reception over RS-485: + +```arduino +void loop() { + + RS485.receive(); + auto aval = RS485.available(); + if (aval > 0) { + int readValue = RS485.read(); + + // Manage out-of-range inputs + if (readValue > 4) + readValue = readValue % 4; + + Serial.print("Command for relay: "); + Serial.println(readValue); + newState = true; + + // Array indexes start at 0 + idx = readValue - 1; + } + RS485.noReceive(); + + if (newState) { + changeRelay(); + newState = false; + } +} +``` + +The `changeRelay()` function manages the relay and status LED state based on the received input packet. This function is called after receiving data via RS-485 to update the relay and status LED states accordingly: + +```arduino +/** + Changes relay and status LED state given the received value. +*/ +void changeRelay() { + // Get current status + auto status = statuses[idx] ? HIGH : LOW; + + // Apply new status to the outputs + digitalWrite(relays[idx], status); + digitalWrite(leds[idx], status); + + // Invert the statuses array to be updated + statuses[idx] = !statuses[idx]; +} +``` + +### Full Example Code + +You can access the complete example code [here](assets/Opta_RS485_Example.zip); after extracting the files, `Opta_RS485_Sender` and `Opta_RS485_Receiver` sketches are available to try with your Opta™ devices. + +### Testing Out the Sketches + +Now it is time to test the application. Using the Serial Monitor of the Arduino IDE, send a value between `1` and `4` with the sender device. Sending a `1` will close the 1st relay and turn on the corresponding status LED of the receiver Opta™ device. Sending a `1` again will open the 1st relay and turn off the status LED of the receiver device. + +Here is a list of the values the receiver Opta™ device can receive and the result they produce: + +- **Sending `1`**: The first relay and the first status LED will turn on or off +- **Sending `2`**: The second relay and the second status LED will turn on or off +- **Sending `3`**: The third relay and the third status LED will turn on or off +- **Sending `4`**: The fourth relay and the fourth status LED will turn on or off + +## Conclusion + +In this tutorial, we established an RS-485 connection between two Opta™ devices. We also learned how to use the `ArduinoRS485.h` library to send and receive values between these two devices using RS-485 layer. Finally, the tutorial showed how to take the data sent via RS-485 to interact with the Opta™ PLC's hardware features, such as its onboard relays and status LEDs. + +### Next Steps + +Now that you are familiar with the RS-485 communication interface on the Opta™, take a look at the following documentation to learn more: + +* Take a look at [getting started tutorial](/tutorials/opta/getting-started) to get a better overview of the features of Opta™ + +* If you wish to incorporate Wi-Fi®/Bluetooth® Low Energy in your Opta™ solutions, have a look at [connectivity tutorial](/tutorials/opta/getting-started-connectivity) + +* If you are interested in seeing the RS-485 interface and the Opta™ being put to work in a real-life scenario, check the [tank level application note](/tutorials/opta/tank-level-app-note) diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-with-rs485/hero-banner.png b/content/hardware/07.opta/opta-family/opta/tutorials/getting-started-with-rs485/hero-banner.png similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-with-rs485/hero-banner.png rename to content/hardware/07.opta/opta-family/opta/tutorials/getting-started-with-rs485/hero-banner.png diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started/assets/opta-analog-inputs.svg b/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-analog-inputs.svg similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started/assets/opta-analog-inputs.svg rename to content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-analog-inputs.svg diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started/assets/opta-clean-contact.svg b/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-clean-contact.svg similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started/assets/opta-clean-contact.svg rename to content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-clean-contact.svg diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started/assets/opta-core-install.png b/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-core-install.png similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started/assets/opta-core-install.png rename to content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-core-install.png diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started/assets/opta-device-LED.svg b/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-device-LED.svg similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started/assets/opta-device-LED.svg rename to content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-device-LED.svg diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started/assets/opta-device-button.svg b/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-device-button.svg similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started/assets/opta-device-button.svg rename to content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-device-button.svg diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started/assets/opta-device.svg b/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-device.svg similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started/assets/opta-device.svg rename to content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-device.svg diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started/assets/opta-out-relays.svg b/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-out-relays.svg similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started/assets/opta-out-relays.svg rename to content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-out-relays.svg diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started/assets/opta-voltage-pins.svg b/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-voltage-pins.svg similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started/assets/opta-voltage-pins.svg rename to content/hardware/07.opta/opta-family/opta/tutorials/getting-started/assets/opta-voltage-pins.svg diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started/content.md b/content/hardware/07.opta/opta-family/opta/tutorials/getting-started/content.md similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started/content.md rename to content/hardware/07.opta/opta-family/opta/tutorials/getting-started/content.md diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/tank-level-app-note/assets/application_representation.svg b/content/hardware/07.opta/opta-family/opta/tutorials/tank-level-app-note/assets/application_representation.svg similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/tank-level-app-note/assets/application_representation.svg rename to content/hardware/07.opta/opta-family/opta/tutorials/tank-level-app-note/assets/application_representation.svg diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/tank-level-app-note/assets/cloud_integration.svg b/content/hardware/07.opta/opta-family/opta/tutorials/tank-level-app-note/assets/cloud_integration.svg similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/tank-level-app-note/assets/cloud_integration.svg rename to content/hardware/07.opta/opta-family/opta/tutorials/tank-level-app-note/assets/cloud_integration.svg diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/tank-level-app-note/assets/electrical_connections.svg b/content/hardware/07.opta/opta-family/opta/tutorials/tank-level-app-note/assets/electrical_connections.svg similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/tank-level-app-note/assets/electrical_connections.svg rename to content/hardware/07.opta/opta-family/opta/tutorials/tank-level-app-note/assets/electrical_connections.svg diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/tank-level-app-note/assets/tank-level-monitoring-sketch.zip b/content/hardware/07.opta/opta-family/opta/tutorials/tank-level-app-note/assets/tank-level-monitoring-sketch.zip similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/tank-level-app-note/assets/tank-level-monitoring-sketch.zip rename to content/hardware/07.opta/opta-family/opta/tutorials/tank-level-app-note/assets/tank-level-monitoring-sketch.zip diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/tank-level-app-note/content.md b/content/hardware/07.opta/opta-family/opta/tutorials/tank-level-app-note/content.md similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/tank-level-app-note/content.md rename to content/hardware/07.opta/opta-family/opta/tutorials/tank-level-app-note/content.md diff --git a/content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/tank-level-app-note/hero-banner.png b/content/hardware/07.opta/opta-family/opta/tutorials/tank-level-app-note/hero-banner.png similarity index 100% rename from content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/tank-level-app-note/hero-banner.png rename to content/hardware/07.opta/opta-family/opta/tutorials/tank-level-app-note/hero-banner.png diff --git a/content/hardware/07.edu/carriers/braccio-carrier/compatibility.yml b/content/hardware/08.edu/carriers/braccio-carrier/compatibility.yml similarity index 100% rename from content/hardware/07.edu/carriers/braccio-carrier/compatibility.yml rename to content/hardware/08.edu/carriers/braccio-carrier/compatibility.yml diff --git a/content/hardware/07.edu/carriers/braccio-carrier/datasheet/assets/Block_Diagram_Braccio_Carrier.svg b/content/hardware/08.edu/carriers/braccio-carrier/datasheet/assets/Block_Diagram_Braccio_Carrier.svg similarity index 100% rename from content/hardware/07.edu/carriers/braccio-carrier/datasheet/assets/Block_Diagram_Braccio_Carrier.svg rename to content/hardware/08.edu/carriers/braccio-carrier/datasheet/assets/Block_Diagram_Braccio_Carrier.svg diff --git a/content/hardware/07.edu/carriers/braccio-carrier/datasheet/assets/Power_Tree_Braccio_Carrier.jpg b/content/hardware/08.edu/carriers/braccio-carrier/datasheet/assets/Power_Tree_Braccio_Carrier.jpg similarity index 100% rename from content/hardware/07.edu/carriers/braccio-carrier/datasheet/assets/Power_Tree_Braccio_Carrier.jpg rename to content/hardware/08.edu/carriers/braccio-carrier/datasheet/assets/Power_Tree_Braccio_Carrier.jpg diff --git a/content/hardware/07.edu/carriers/braccio-carrier/datasheet/assets/System_Block_Diagram_Braccio_Carrier.jpg b/content/hardware/08.edu/carriers/braccio-carrier/datasheet/assets/System_Block_Diagram_Braccio_Carrier.jpg similarity index 100% rename from content/hardware/07.edu/carriers/braccio-carrier/datasheet/assets/System_Block_Diagram_Braccio_Carrier.jpg rename to content/hardware/08.edu/carriers/braccio-carrier/datasheet/assets/System_Block_Diagram_Braccio_Carrier.jpg diff --git a/content/hardware/07.edu/carriers/braccio-carrier/datasheet/assets/braccio-connectors.svg b/content/hardware/08.edu/carriers/braccio-carrier/datasheet/assets/braccio-connectors.svg similarity index 100% rename from content/hardware/07.edu/carriers/braccio-carrier/datasheet/assets/braccio-connectors.svg rename to content/hardware/08.edu/carriers/braccio-carrier/datasheet/assets/braccio-connectors.svg diff --git a/content/hardware/07.edu/carriers/braccio-carrier/datasheet/assets/braccio-mount.svg b/content/hardware/08.edu/carriers/braccio-carrier/datasheet/assets/braccio-mount.svg similarity index 100% rename from content/hardware/07.edu/carriers/braccio-carrier/datasheet/assets/braccio-mount.svg rename to content/hardware/08.edu/carriers/braccio-carrier/datasheet/assets/braccio-mount.svg diff --git a/content/hardware/07.edu/carriers/braccio-carrier/datasheet/assets/braccio-outline.svg b/content/hardware/08.edu/carriers/braccio-carrier/datasheet/assets/braccio-outline.svg similarity index 100% rename from content/hardware/07.edu/carriers/braccio-carrier/datasheet/assets/braccio-outline.svg rename to content/hardware/08.edu/carriers/braccio-carrier/datasheet/assets/braccio-outline.svg diff --git a/content/hardware/07.edu/carriers/braccio-carrier/datasheet/assets/braccio-pinout.png b/content/hardware/08.edu/carriers/braccio-carrier/datasheet/assets/braccio-pinout.png similarity index 100% rename from content/hardware/07.edu/carriers/braccio-carrier/datasheet/assets/braccio-pinout.png rename to content/hardware/08.edu/carriers/braccio-carrier/datasheet/assets/braccio-pinout.png diff --git a/content/hardware/07.edu/carriers/braccio-carrier/datasheet/assets/featured.png b/content/hardware/08.edu/carriers/braccio-carrier/datasheet/assets/featured.png similarity index 100% rename from content/hardware/07.edu/carriers/braccio-carrier/datasheet/assets/featured.png rename to content/hardware/08.edu/carriers/braccio-carrier/datasheet/assets/featured.png diff --git a/content/hardware/07.edu/carriers/braccio-carrier/datasheet/datasheet.md b/content/hardware/08.edu/carriers/braccio-carrier/datasheet/datasheet.md similarity index 100% rename from content/hardware/07.edu/carriers/braccio-carrier/datasheet/datasheet.md rename to content/hardware/08.edu/carriers/braccio-carrier/datasheet/datasheet.md diff --git a/content/hardware/07.edu/carriers/braccio-carrier/downloads/ABX00032-dxf.zip b/content/hardware/08.edu/carriers/braccio-carrier/downloads/ABX00032-dxf.zip similarity index 100% rename from content/hardware/07.edu/carriers/braccio-carrier/downloads/ABX00032-dxf.zip rename to content/hardware/08.edu/carriers/braccio-carrier/downloads/ABX00032-dxf.zip diff --git a/content/hardware/07.edu/carriers/braccio-carrier/downloads/ABX00032-fritzing.fzpz b/content/hardware/08.edu/carriers/braccio-carrier/downloads/ABX00032-fritzing.fzpz similarity index 100% rename from content/hardware/07.edu/carriers/braccio-carrier/downloads/ABX00032-fritzing.fzpz rename to content/hardware/08.edu/carriers/braccio-carrier/downloads/ABX00032-fritzing.fzpz diff --git a/content/hardware/07.edu/carriers/braccio-carrier/downloads/ABX00032-full-pinout.pdf b/content/hardware/08.edu/carriers/braccio-carrier/downloads/ABX00032-full-pinout.pdf similarity index 100% rename from content/hardware/07.edu/carriers/braccio-carrier/downloads/ABX00032-full-pinout.pdf rename to content/hardware/08.edu/carriers/braccio-carrier/downloads/ABX00032-full-pinout.pdf diff --git a/content/hardware/07.edu/carriers/braccio-carrier/downloads/ABX00032-schematics.pdf b/content/hardware/08.edu/carriers/braccio-carrier/downloads/ABX00032-schematics.pdf similarity index 100% rename from content/hardware/07.edu/carriers/braccio-carrier/downloads/ABX00032-schematics.pdf rename to content/hardware/08.edu/carriers/braccio-carrier/downloads/ABX00032-schematics.pdf diff --git a/content/hardware/07.edu/carriers/braccio-carrier/downloads/ABX00032-stand-stl.zip b/content/hardware/08.edu/carriers/braccio-carrier/downloads/ABX00032-stand-stl.zip similarity index 100% rename from content/hardware/07.edu/carriers/braccio-carrier/downloads/ABX00032-stand-stl.zip rename to content/hardware/08.edu/carriers/braccio-carrier/downloads/ABX00032-stand-stl.zip diff --git a/content/hardware/07.edu/carriers/braccio-carrier/downloads/ABX00032-step.zip b/content/hardware/08.edu/carriers/braccio-carrier/downloads/ABX00032-step.zip similarity index 100% rename from content/hardware/07.edu/carriers/braccio-carrier/downloads/ABX00032-step.zip rename to content/hardware/08.edu/carriers/braccio-carrier/downloads/ABX00032-step.zip diff --git a/content/hardware/07.edu/carriers/braccio-carrier/essentials.md b/content/hardware/08.edu/carriers/braccio-carrier/essentials.md similarity index 100% rename from content/hardware/07.edu/carriers/braccio-carrier/essentials.md rename to content/hardware/08.edu/carriers/braccio-carrier/essentials.md diff --git a/content/hardware/07.edu/carriers/braccio-carrier/features.md b/content/hardware/08.edu/carriers/braccio-carrier/features.md similarity index 100% rename from content/hardware/07.edu/carriers/braccio-carrier/features.md rename to content/hardware/08.edu/carriers/braccio-carrier/features.md diff --git a/content/hardware/07.edu/carriers/braccio-carrier/image.svg b/content/hardware/08.edu/carriers/braccio-carrier/image.svg similarity index 100% rename from content/hardware/07.edu/carriers/braccio-carrier/image.svg rename to content/hardware/08.edu/carriers/braccio-carrier/image.svg diff --git a/content/hardware/07.edu/carriers/braccio-carrier/interactive/ABX00032-pinout.png b/content/hardware/08.edu/carriers/braccio-carrier/interactive/ABX00032-pinout.png similarity index 100% rename from content/hardware/07.edu/carriers/braccio-carrier/interactive/ABX00032-pinout.png rename to content/hardware/08.edu/carriers/braccio-carrier/interactive/ABX00032-pinout.png diff --git a/content/hardware/07.edu/carriers/braccio-carrier/product.md b/content/hardware/08.edu/carriers/braccio-carrier/product.md similarity index 100% rename from content/hardware/07.edu/carriers/braccio-carrier/product.md rename to content/hardware/08.edu/carriers/braccio-carrier/product.md diff --git a/content/hardware/07.edu/carriers/braccio-carrier/tech-specs.md b/content/hardware/08.edu/carriers/braccio-carrier/tech-specs.md similarity index 100% rename from content/hardware/07.edu/carriers/braccio-carrier/tech-specs.md rename to content/hardware/08.edu/carriers/braccio-carrier/tech-specs.md diff --git a/content/hardware/07.edu/carriers/braccio-carrier/tech-specs.yml b/content/hardware/08.edu/carriers/braccio-carrier/tech-specs.yml similarity index 100% rename from content/hardware/07.edu/carriers/braccio-carrier/tech-specs.yml rename to content/hardware/08.edu/carriers/braccio-carrier/tech-specs.yml diff --git a/content/hardware/07.edu/carriers/category.md b/content/hardware/08.edu/carriers/category.md similarity index 100% rename from content/hardware/07.edu/carriers/category.md rename to content/hardware/08.edu/carriers/category.md diff --git a/content/hardware/07.edu/family.md b/content/hardware/08.edu/family.md similarity index 100% rename from content/hardware/07.edu/family.md rename to content/hardware/08.edu/family.md diff --git a/content/hardware/07.edu/image-480.png b/content/hardware/08.edu/image-480.png similarity index 100% rename from content/hardware/07.edu/image-480.png rename to content/hardware/08.edu/image-480.png diff --git a/content/hardware/07.edu/image.png b/content/hardware/08.edu/image.png similarity index 100% rename from content/hardware/07.edu/image.png rename to content/hardware/08.edu/image.png diff --git a/content/hardware/08.kits/family.md b/content/hardware/09.kits/family.md similarity index 100% rename from content/hardware/08.kits/family.md rename to content/hardware/09.kits/family.md diff --git a/content/hardware/08.kits/image-480.png b/content/hardware/09.kits/image-480.png similarity index 100% rename from content/hardware/08.kits/image-480.png rename to content/hardware/09.kits/image-480.png diff --git a/content/hardware/08.kits/image.png b/content/hardware/09.kits/image.png similarity index 100% rename from content/hardware/08.kits/image.png rename to content/hardware/09.kits/image.png diff --git a/content/hardware/08.kits/maker/category.md b/content/hardware/09.kits/maker/category.md similarity index 100% rename from content/hardware/08.kits/maker/category.md rename to content/hardware/09.kits/maker/category.md diff --git a/content/hardware/08.kits/maker/plant-watering-kit/compatibility.yml b/content/hardware/09.kits/maker/iot-bundle/compatibility.yml similarity index 100% rename from content/hardware/08.kits/maker/plant-watering-kit/compatibility.yml rename to content/hardware/09.kits/maker/iot-bundle/compatibility.yml diff --git a/content/hardware/08.kits/maker/iot-bundle/features.md b/content/hardware/09.kits/maker/iot-bundle/features.md similarity index 96% rename from content/hardware/08.kits/maker/iot-bundle/features.md rename to content/hardware/09.kits/maker/iot-bundle/features.md index 5264bb7fd4..a8ac425767 100644 --- a/content/hardware/08.kits/maker/iot-bundle/features.md +++ b/content/hardware/09.kits/maker/iot-bundle/features.md @@ -1,47 +1,47 @@ - - -The Arduino IoT Bundle includes 5 step by step tutorials that will get you started with the components in the bundle. They are found just below: - - - - - - - - - Create a pillow that sends your love with the help of the Arduino IoT Cloud! - - - - - - - Create a Puzzle Box with the help of the Arduino IoT Cloud! - - - - - - - Train your cat with the help of the Arduino IoT Cloud! - - - - - - - Create a desktop pet with the help of the Arduino IoT Cloud! - - - - - - - Create a plant communicator with the help of the Arduino IoT Cloud! - - - - - - - + + +The Arduino IoT Bundle includes 5 step by step tutorials that will get you started with the components in the bundle. They are found just below: + + + + + + + + + Create a pillow that sends your love with the help of the Arduino IoT Cloud! + + + + + + + Create a Puzzle Box with the help of the Arduino IoT Cloud! + + + + + + + Train your cat with the help of the Arduino IoT Cloud! + + + + + + + Create a desktop pet with the help of the Arduino IoT Cloud! + + + + + + + Create a plant communicator with the help of the Arduino IoT Cloud! + + + + + + + diff --git a/content/hardware/08.kits/maker/iot-bundle/image.svg b/content/hardware/09.kits/maker/iot-bundle/image.svg similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/image.svg rename to content/hardware/09.kits/maker/iot-bundle/image.svg diff --git a/content/hardware/08.kits/maker/iot-bundle/product.md b/content/hardware/09.kits/maker/iot-bundle/product.md similarity index 98% rename from content/hardware/08.kits/maker/iot-bundle/product.md rename to content/hardware/09.kits/maker/iot-bundle/product.md index 8504323444..614feee67f 100644 --- a/content/hardware/08.kits/maker/iot-bundle/product.md +++ b/content/hardware/09.kits/maker/iot-bundle/product.md @@ -1,6 +1,6 @@ ---- -title: IoT Bundle -url_shop: https://store.arduino.cc/iot-bundle ---- - +--- +title: IoT Bundle +url_shop: https://store.arduino.cc/iot-bundle +--- + Arduino IoT Bundle allows you to build your next smart project. Ever wanted an automated house? Or a smart garden? Well, now it’s easy with the Arduino IoT Cloud compatible boards. It means: you can connect devices, visualize data, control and share your projects from anywhere in the world. Whether you’re a beginner or a pro, we have a wide range of plans to make sure you get the features you need. \ No newline at end of file diff --git a/content/hardware/08.kits/maker/iot-bundle/tech-specs.md b/content/hardware/09.kits/maker/iot-bundle/tech-specs.md similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tech-specs.md rename to content/hardware/09.kits/maker/iot-bundle/tech-specs.md diff --git a/content/hardware/08.kits/maker/iot-bundle/tech-specs.yml b/content/hardware/09.kits/maker/iot-bundle/tech-specs.yml similarity index 96% rename from content/hardware/08.kits/maker/iot-bundle/tech-specs.yml rename to content/hardware/09.kits/maker/iot-bundle/tech-specs.yml index 81e760cbb9..4ef764764b 100644 --- a/content/hardware/08.kits/maker/iot-bundle/tech-specs.yml +++ b/content/hardware/09.kits/maker/iot-bundle/tech-specs.yml @@ -1,33 +1,33 @@ -Kit: - Name: Arduino® IoT Bundle - SKU: AKX00042 -Components: - Arduino Nano RP2040 Connect: 1x - micro USB cable: 1x - 400-point breadboard: 1x - solid-core jumper wires: 70x - stranded jumper wire: 2x - phototransistors: 6x - potentiometers (10k ohm): 3x - pushbuttons: 10x - temperature sensor (TMP36): 1x - tilt sensor: 1x - alphanumeric LCD (16 x 2 characters): 1x - bright white: 1x - LEDs (1 RGB, 8 red, 8 green, 8 yellow, 3 blue): 28x - small DC motor (6/9V): 1x - small servo motor: 1x - piezo capsule (PKM17EPP-4001-B0): 1x - H-bridge motor driver (L293D): 1x - optocouplers (4N35): 1x - MOSFET transistors (IRF520): 2x - capacitors (100uF): 5x - diodes (1N4007): 5x - male pin strip (40 x 1): 1x - resistors (220 ohm): 20x - resistors (560 ohm): 5x - resistors (1k ohm): 5x - resistors (4.7k ohm): 5x - resistors (10k ohm): 20x - resistors (1M ohm): 5x - resistors (10M ohm): 5x +Kit: + Name: Arduino® IoT Bundle + SKU: AKX00042 +Components: + Arduino Nano RP2040 Connect: 1x + micro USB cable: 1x + 400-point breadboard: 1x + solid-core jumper wires: 70x + stranded jumper wire: 2x + phototransistors: 6x + potentiometers (10k ohm): 3x + pushbuttons: 10x + temperature sensor (TMP36): 1x + tilt sensor: 1x + alphanumeric LCD (16 x 2 characters): 1x + bright white: 1x + LEDs (1 RGB, 8 red, 8 green, 8 yellow, 3 blue): 28x + small DC motor (6/9V): 1x + small servo motor: 1x + piezo capsule (PKM17EPP-4001-B0): 1x + H-bridge motor driver (L293D): 1x + optocouplers (4N35): 1x + MOSFET transistors (IRF520): 2x + capacitors (100uF): 5x + diodes (1N4007): 5x + male pin strip (40 x 1): 1x + resistors (220 ohm): 20x + resistors (560 ohm): 5x + resistors (1k ohm): 5x + resistors (4.7k ohm): 5x + resistors (10k ohm): 20x + resistors (1M ohm): 5x + resistors (10M ohm): 5x diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/_ypE8fl7Ln6.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/_ypE8fl7Ln6.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/_ypE8fl7Ln6.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/_ypE8fl7Ln6.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/circuit_tLcnUy2ifl.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/circuit_tLcnUy2ifl.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/circuit_tLcnUy2ifl.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/circuit_tLcnUy2ifl.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/love-you-pillow-01_VoyWPl8L6l.gif b/content/hardware/09.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/love-you-pillow-01_VoyWPl8L6l.gif similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/love-you-pillow-01_VoyWPl8L6l.gif rename to content/hardware/09.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/love-you-pillow-01_VoyWPl8L6l.gif diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/love-you-pillow-02_ydUsouV4bl.gif b/content/hardware/09.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/love-you-pillow-02_ydUsouV4bl.gif similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/love-you-pillow-02_ydUsouV4bl.gif rename to content/hardware/09.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/love-you-pillow-02_ydUsouV4bl.gif diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/pillow2-cover_eWFrQi0MOT.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/pillow2-cover_eWFrQi0MOT.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/pillow2-cover_eWFrQi0MOT.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/pillow2-cover_eWFrQi0MOT.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/screenshot_2022-03-30_at_14_26_54_stYUq5y7c2.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/screenshot_2022-03-30_at_14_26_54_stYUq5y7c2.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/screenshot_2022-03-30_at_14_26_54_stYUq5y7c2.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/screenshot_2022-03-30_at_14_26_54_stYUq5y7c2.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/screenshot_2022-11-23_140745_adGbm9cDej.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/screenshot_2022-11-23_140745_adGbm9cDej.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/screenshot_2022-11-23_140745_adGbm9cDej.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/screenshot_2022-11-23_140745_adGbm9cDej.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/template_overview.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/template_overview.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/template_overview.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/i-love-you-pillow/assets/template_overview.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/i-love-you-pillow/content.md b/content/hardware/09.kits/maker/iot-bundle/tutorials/i-love-you-pillow/content.md similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/i-love-you-pillow/content.md rename to content/hardware/09.kits/maker/iot-bundle/tutorials/i-love-you-pillow/content.md diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/i-love-you-pillow/hero-banner.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/i-love-you-pillow/hero-banner.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/i-love-you-pillow/hero-banner.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/i-love-you-pillow/hero-banner.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/_mV3ZK8zeAh.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/_mV3ZK8zeAh.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/_mV3ZK8zeAh.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/_mV3ZK8zeAh.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/gif-cat_vCx1OHLrzl.gif b/content/hardware/09.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/gif-cat_vCx1OHLrzl.gif similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/gif-cat_vCx1OHLrzl.gif rename to content/hardware/09.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/gif-cat_vCx1OHLrzl.gif diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/light_rp2040_w373rVgQAw.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/light_rp2040_w373rVgQAw.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/light_rp2040_w373rVgQAw.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/light_rp2040_w373rVgQAw.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/palvov-cat-01_FHBOz5Z3MA.gif b/content/hardware/09.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/palvov-cat-01_FHBOz5Z3MA.gif similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/palvov-cat-01_FHBOz5Z3MA.gif rename to content/hardware/09.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/palvov-cat-01_FHBOz5Z3MA.gif diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/palvov-cat-02.gif b/content/hardware/09.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/palvov-cat-02.gif similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/palvov-cat-02.gif rename to content/hardware/09.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/palvov-cat-02.gif diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/palvov-cat-03_EJSoVjN9qB.gif b/content/hardware/09.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/palvov-cat-03_EJSoVjN9qB.gif similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/palvov-cat-03_EJSoVjN9qB.gif rename to content/hardware/09.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/palvov-cat-03_EJSoVjN9qB.gif diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/piezo_buzzer_rp2040_whR92Z3Wgx.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/piezo_buzzer_rp2040_whR92Z3Wgx.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/piezo_buzzer_rp2040_whR92Z3Wgx.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/piezo_buzzer_rp2040_whR92Z3Wgx.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/screenshot_2022-11-23_141459_JVW8zmmeP0.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/screenshot_2022-11-23_141459_JVW8zmmeP0.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/screenshot_2022-11-23_141459_JVW8zmmeP0.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/screenshot_2022-11-23_141459_JVW8zmmeP0.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/servo_motor_rp2040_PAcv0Yejb2.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/servo_motor_rp2040_PAcv0Yejb2.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/servo_motor_rp2040_PAcv0Yejb2.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/servo_motor_rp2040_PAcv0Yejb2.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/template_overview.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/template_overview.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/template_overview.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/pavlovs-cat/assets/template_overview.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/pavlovs-cat/content.md b/content/hardware/09.kits/maker/iot-bundle/tutorials/pavlovs-cat/content.md similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/pavlovs-cat/content.md rename to content/hardware/09.kits/maker/iot-bundle/tutorials/pavlovs-cat/content.md diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/pavlovs-cat/hero-banner.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/pavlovs-cat/hero-banner.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/pavlovs-cat/hero-banner.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/pavlovs-cat/hero-banner.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/plant-communicator/assets/_rdaslUwR6h.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/plant-communicator/assets/_rdaslUwR6h.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/plant-communicator/assets/_rdaslUwR6h.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/plant-communicator/assets/_rdaslUwR6h.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/plant-communicator/assets/diy-soil-moisture-rp2040_q2RlMGdgl9.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/plant-communicator/assets/diy-soil-moisture-rp2040_q2RlMGdgl9.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/plant-communicator/assets/diy-soil-moisture-rp2040_q2RlMGdgl9.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/plant-communicator/assets/diy-soil-moisture-rp2040_q2RlMGdgl9.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/plant-communicator/assets/light__temperature_sensor_rp2040_bfbwQp7XjU.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/plant-communicator/assets/light__temperature_sensor_rp2040_bfbwQp7XjU.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/plant-communicator/assets/light__temperature_sensor_rp2040_bfbwQp7XjU.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/plant-communicator/assets/light__temperature_sensor_rp2040_bfbwQp7XjU.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/plant-communicator/assets/plant_communicator_01.gif b/content/hardware/09.kits/maker/iot-bundle/tutorials/plant-communicator/assets/plant_communicator_01.gif similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/plant-communicator/assets/plant_communicator_01.gif rename to content/hardware/09.kits/maker/iot-bundle/tutorials/plant-communicator/assets/plant_communicator_01.gif diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/plant-communicator/assets/plant_communicator_03__2_.gif b/content/hardware/09.kits/maker/iot-bundle/tutorials/plant-communicator/assets/plant_communicator_03__2_.gif similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/plant-communicator/assets/plant_communicator_03__2_.gif rename to content/hardware/09.kits/maker/iot-bundle/tutorials/plant-communicator/assets/plant_communicator_03__2_.gif diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/plant-communicator/assets/plant_communicator_04.gif b/content/hardware/09.kits/maker/iot-bundle/tutorials/plant-communicator/assets/plant_communicator_04.gif similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/plant-communicator/assets/plant_communicator_04.gif rename to content/hardware/09.kits/maker/iot-bundle/tutorials/plant-communicator/assets/plant_communicator_04.gif diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/plant-communicator/assets/screenshot_2022-11-23_141037_Q9gBcgrkER.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/plant-communicator/assets/screenshot_2022-11-23_141037_Q9gBcgrkER.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/plant-communicator/assets/screenshot_2022-11-23_141037_Q9gBcgrkER.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/plant-communicator/assets/screenshot_2022-11-23_141037_Q9gBcgrkER.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/plant-communicator/assets/template_overview.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/plant-communicator/assets/template_overview.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/plant-communicator/assets/template_overview.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/plant-communicator/assets/template_overview.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/plant-communicator/content.md b/content/hardware/09.kits/maker/iot-bundle/tutorials/plant-communicator/content.md similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/plant-communicator/content.md rename to content/hardware/09.kits/maker/iot-bundle/tutorials/plant-communicator/content.md diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/plant-communicator/hero-banner.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/plant-communicator/hero-banner.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/plant-communicator/hero-banner.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/plant-communicator/hero-banner.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/_VbBUKNXj0o.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/_VbBUKNXj0o.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/_VbBUKNXj0o.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/_VbBUKNXj0o.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/cloudinstructions_rp2040_0AMlQHeGHs.gif b/content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/cloudinstructions_rp2040_0AMlQHeGHs.gif similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/cloudinstructions_rp2040_0AMlQHeGHs.gif rename to content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/cloudinstructions_rp2040_0AMlQHeGHs.gif diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/lcd_part_rp2040_wOrq2EKGuO.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/lcd_part_rp2040_wOrq2EKGuO.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/lcd_part_rp2040_wOrq2EKGuO.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/lcd_part_rp2040_wOrq2EKGuO.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/piezo_buzzer_comeplete_rp2040_JAUtOjyKq1.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/piezo_buzzer_comeplete_rp2040_JAUtOjyKq1.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/piezo_buzzer_comeplete_rp2040_JAUtOjyKq1.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/piezo_buzzer_comeplete_rp2040_JAUtOjyKq1.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/piezo_buzzer_part_rp2040_iaPHtGSH0X.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/piezo_buzzer_part_rp2040_iaPHtGSH0X.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/piezo_buzzer_part_rp2040_iaPHtGSH0X.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/piezo_buzzer_part_rp2040_iaPHtGSH0X.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/potentiometer_part_rp2040_q8hHfs8AIS.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/potentiometer_part_rp2040_q8hHfs8AIS.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/potentiometer_part_rp2040_q8hHfs8AIS.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/potentiometer_part_rp2040_q8hHfs8AIS.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/puzzlebox_pi0UiMBngP.gif b/content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/puzzlebox_pi0UiMBngP.gif similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/puzzlebox_pi0UiMBngP.gif rename to content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/puzzlebox_pi0UiMBngP.gif diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/rgb_comeplete_rp2040_6AuNMnXduR.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/rgb_comeplete_rp2040_6AuNMnXduR.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/rgb_comeplete_rp2040_6AuNMnXduR.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/rgb_comeplete_rp2040_6AuNMnXduR.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/rgb_part_rp2040_4eGOKtRQgk.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/rgb_part_rp2040_4eGOKtRQgk.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/rgb_part_rp2040_4eGOKtRQgk.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/rgb_part_rp2040_4eGOKtRQgk.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/rgbled_s82wjxgcnf_1WXt8cDpSj.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/rgbled_s82wjxgcnf_1WXt8cDpSj.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/rgbled_s82wjxgcnf_1WXt8cDpSj.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/rgbled_s82wjxgcnf_1WXt8cDpSj.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/safe_combination_Xkek4QBhoy.gif b/content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/safe_combination_Xkek4QBhoy.gif similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/safe_combination_Xkek4QBhoy.gif rename to content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/safe_combination_Xkek4QBhoy.gif diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/screenshot_2022-11-17_095328_ujTWxb7Xtp.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/screenshot_2022-11-17_095328_ujTWxb7Xtp.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/screenshot_2022-11-17_095328_ujTWxb7Xtp.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/screenshot_2022-11-17_095328_ujTWxb7Xtp.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/screenshot_2022-11-23_141306_tsMoI77zJw.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/screenshot_2022-11-23_141306_tsMoI77zJw.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/screenshot_2022-11-23_141306_tsMoI77zJw.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/screenshot_2022-11-23_141306_tsMoI77zJw.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/servo_motor_comeplete_rp2040_mXHekbPnRO.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/servo_motor_comeplete_rp2040_mXHekbPnRO.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/servo_motor_comeplete_rp2040_mXHekbPnRO.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/servo_motor_comeplete_rp2040_mXHekbPnRO.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/servo_motor_part_rp2040_4ZqZ4C9F5w.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/servo_motor_part_rp2040_4ZqZ4C9F5w.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/servo_motor_part_rp2040_4ZqZ4C9F5w.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/servo_motor_part_rp2040_4ZqZ4C9F5w.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/template_overview.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/template_overview.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/assets/template_overview.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/assets/template_overview.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/content.md b/content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/content.md similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/content.md rename to content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/content.md diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/hero-banner.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/hero-banner.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/puzzlebox/hero-banner.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/puzzlebox/hero-banner.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/the-nerd/assets/_45dZFAyOab.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/the-nerd/assets/_45dZFAyOab.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/the-nerd/assets/_45dZFAyOab.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/the-nerd/assets/_45dZFAyOab.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/the-nerd/assets/nerd-cloud-setup_RC5c4S0ASc.gif b/content/hardware/09.kits/maker/iot-bundle/tutorials/the-nerd/assets/nerd-cloud-setup_RC5c4S0ASc.gif similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/the-nerd/assets/nerd-cloud-setup_RC5c4S0ASc.gif rename to content/hardware/09.kits/maker/iot-bundle/tutorials/the-nerd/assets/nerd-cloud-setup_RC5c4S0ASc.gif diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/the-nerd/assets/screenshot_2022-11-18_175524_4XRWc1dHYc.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/the-nerd/assets/screenshot_2022-11-18_175524_4XRWc1dHYc.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/the-nerd/assets/screenshot_2022-11-18_175524_4XRWc1dHYc.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/the-nerd/assets/screenshot_2022-11-18_175524_4XRWc1dHYc.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/the-nerd/assets/template_overview.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/the-nerd/assets/template_overview.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/the-nerd/assets/template_overview.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/the-nerd/assets/template_overview.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/the-nerd/assets/the_nerd_m3DggOdFBj.gif b/content/hardware/09.kits/maker/iot-bundle/tutorials/the-nerd/assets/the_nerd_m3DggOdFBj.gif similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/the-nerd/assets/the_nerd_m3DggOdFBj.gif rename to content/hardware/09.kits/maker/iot-bundle/tutorials/the-nerd/assets/the_nerd_m3DggOdFBj.gif diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/the-nerd/assets/the_nerd_rp2040_dqr7egmpao_ESpsLy8iaq.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/the-nerd/assets/the_nerd_rp2040_dqr7egmpao_ESpsLy8iaq.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/the-nerd/assets/the_nerd_rp2040_dqr7egmpao_ESpsLy8iaq.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/the-nerd/assets/the_nerd_rp2040_dqr7egmpao_ESpsLy8iaq.png diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/the-nerd/content.md b/content/hardware/09.kits/maker/iot-bundle/tutorials/the-nerd/content.md similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/the-nerd/content.md rename to content/hardware/09.kits/maker/iot-bundle/tutorials/the-nerd/content.md diff --git a/content/hardware/08.kits/maker/iot-bundle/tutorials/the-nerd/hero-banner.png b/content/hardware/09.kits/maker/iot-bundle/tutorials/the-nerd/hero-banner.png similarity index 100% rename from content/hardware/08.kits/maker/iot-bundle/tutorials/the-nerd/hero-banner.png rename to content/hardware/09.kits/maker/iot-bundle/tutorials/the-nerd/hero-banner.png diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/certifications/Arduino_AKX00037-DoC_CE.pdf b/content/hardware/09.kits/maker/make-your-uno-kit/certifications/Arduino_AKX00037-DoC_CE.pdf similarity index 100% rename from content/hardware/08.kits/maker/make-your-uno-kit/certifications/Arduino_AKX00037-DoC_CE.pdf rename to content/hardware/09.kits/maker/make-your-uno-kit/certifications/Arduino_AKX00037-DoC_CE.pdf diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/compatibility.yml b/content/hardware/09.kits/maker/make-your-uno-kit/compatibility.yml similarity index 94% rename from content/hardware/08.kits/maker/make-your-uno-kit/compatibility.yml rename to content/hardware/09.kits/maker/make-your-uno-kit/compatibility.yml index d9949a33a5..5a204cdaf8 100644 --- a/content/hardware/08.kits/maker/make-your-uno-kit/compatibility.yml +++ b/content/hardware/09.kits/maker/make-your-uno-kit/compatibility.yml @@ -1,10 +1,10 @@ -software: - - arduino-ide - - arduino-cli - - web-editor -hardware: - shields: - - 4-relays-shield - - motor-shield-rev3 - carriers: ~ +software: + - arduino-ide + - arduino-cli + - web-editor +hardware: + shields: + - 4-relays-shield + - motor-shield-rev3 + carriers: ~ boards: ~ \ No newline at end of file diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/audioComponentsView.png b/content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/audioComponentsView.png similarity index 100% rename from content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/audioComponentsView.png rename to content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/audioComponentsView.png diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/boardOutline.svg b/content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/boardOutline.svg similarity index 100% rename from content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/boardOutline.svg rename to content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/boardOutline.svg diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/featured.png b/content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/featured.png similarity index 100% rename from content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/featured.png rename to content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/featured.png diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/fusionOutline.svg b/content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/fusionOutline.svg similarity index 100% rename from content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/fusionOutline.svg rename to content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/fusionOutline.svg diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/lowAudioSynth.png b/content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/lowAudioSynth.png similarity index 100% rename from content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/lowAudioSynth.png rename to content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/lowAudioSynth.png diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/pinout.png b/content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/pinout.png similarity index 100% rename from content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/pinout.png rename to content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/pinout.png diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/powerTree.svg b/content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/powerTree.svg similarity index 100% rename from content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/powerTree.svg rename to content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/powerTree.svg diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/synthMounted.png b/content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/synthMounted.png similarity index 100% rename from content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/synthMounted.png rename to content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/synthMounted.png diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/synthOutline.svg b/content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/synthOutline.svg similarity index 100% rename from content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/synthOutline.svg rename to content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/synthOutline.svg diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/synthPotentiometers.svg b/content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/synthPotentiometers.svg similarity index 100% rename from content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/synthPotentiometers.svg rename to content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/synthPotentiometers.svg diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/synthTopology.svg b/content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/synthTopology.svg similarity index 100% rename from content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/synthTopology.svg rename to content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/synthTopology.svg diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/unoComponentsView.png b/content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/unoComponentsView.png similarity index 100% rename from content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/unoComponentsView.png rename to content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/unoComponentsView.png diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/unoOverview.png b/content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/unoOverview.png similarity index 100% rename from content/hardware/08.kits/maker/make-your-uno-kit/datasheet/assets/unoOverview.png rename to content/hardware/09.kits/maker/make-your-uno-kit/datasheet/assets/unoOverview.png diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/datasheet/datasheet.md b/content/hardware/09.kits/maker/make-your-uno-kit/datasheet/datasheet.md similarity index 100% rename from content/hardware/08.kits/maker/make-your-uno-kit/datasheet/datasheet.md rename to content/hardware/09.kits/maker/make-your-uno-kit/datasheet/datasheet.md diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/downloads/AKX00037-cad-files.zip b/content/hardware/09.kits/maker/make-your-uno-kit/downloads/AKX00037-cad-files.zip similarity index 100% rename from content/hardware/08.kits/maker/make-your-uno-kit/downloads/AKX00037-cad-files.zip rename to content/hardware/09.kits/maker/make-your-uno-kit/downloads/AKX00037-cad-files.zip diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/downloads/AKX00037-schematics.pdf b/content/hardware/09.kits/maker/make-your-uno-kit/downloads/AKX00037-schematics.pdf similarity index 100% rename from content/hardware/08.kits/maker/make-your-uno-kit/downloads/AKX00037-schematics.pdf rename to content/hardware/09.kits/maker/make-your-uno-kit/downloads/AKX00037-schematics.pdf diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/downloads/ASX00037-full-pinout.pdf b/content/hardware/09.kits/maker/make-your-uno-kit/downloads/ASX00037-full-pinout.pdf similarity index 100% rename from content/hardware/08.kits/maker/make-your-uno-kit/downloads/ASX00037-full-pinout.pdf rename to content/hardware/09.kits/maker/make-your-uno-kit/downloads/ASX00037-full-pinout.pdf diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/features.md b/content/hardware/09.kits/maker/make-your-uno-kit/features.md similarity index 96% rename from content/hardware/08.kits/maker/make-your-uno-kit/features.md rename to content/hardware/09.kits/maker/make-your-uno-kit/features.md index 0427e04ada..2130daf8ce 100644 --- a/content/hardware/08.kits/maker/make-your-uno-kit/features.md +++ b/content/hardware/09.kits/maker/make-your-uno-kit/features.md @@ -1,35 +1,35 @@ - - -The Make Your UNO Kit includes all components for you to make your own UNO, such as the ATmega328P chip, a USB-C® module, header rows and more. This kit also features a step-by-step 3D interactive model that will guide you through the soldering steps. - - - - - - - -This kit includes instructions for you who have never soldered before! But don't worry if you're an expert. You can also cut right to the chase! - - - - - -Includes all electronic components needed to build the popular Arduino UNO board from scratch! - - - - - -This kit also includes components to build a Synthesiser Shield for producing funky tunes! - - - - - -A 3D Interactive Guide is included in this kit, that allows you to follow soldering instructions in detail. - - - - - - + + +The Make Your UNO Kit includes all components for you to make your own UNO, such as the ATmega328P chip, a USB-C® module, header rows and more. This kit also features a step-by-step 3D interactive model that will guide you through the soldering steps. + + + + + + + +This kit includes instructions for you who have never soldered before! But don't worry if you're an expert. You can also cut right to the chase! + + + + + +Includes all electronic components needed to build the popular Arduino UNO board from scratch! + + + + + +This kit also includes components to build a Synthesiser Shield for producing funky tunes! + + + + + +A 3D Interactive Guide is included in this kit, that allows you to follow soldering instructions in detail. + + + + + + diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/image.svg b/content/hardware/09.kits/maker/make-your-uno-kit/image.svg similarity index 100% rename from content/hardware/08.kits/maker/make-your-uno-kit/image.svg rename to content/hardware/09.kits/maker/make-your-uno-kit/image.svg diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/interactive/ASX00037-pinout.png b/content/hardware/09.kits/maker/make-your-uno-kit/interactive/ASX00037-pinout.png similarity index 100% rename from content/hardware/08.kits/maker/make-your-uno-kit/interactive/ASX00037-pinout.png rename to content/hardware/09.kits/maker/make-your-uno-kit/interactive/ASX00037-pinout.png diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/interactive/altium.zip b/content/hardware/09.kits/maker/make-your-uno-kit/interactive/altium.zip similarity index 100% rename from content/hardware/08.kits/maker/make-your-uno-kit/interactive/altium.zip rename to content/hardware/09.kits/maker/make-your-uno-kit/interactive/altium.zip diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/product.md b/content/hardware/09.kits/maker/make-your-uno-kit/product.md similarity index 98% rename from content/hardware/08.kits/maker/make-your-uno-kit/product.md rename to content/hardware/09.kits/maker/make-your-uno-kit/product.md index d589c83562..49451ce96f 100644 --- a/content/hardware/08.kits/maker/make-your-uno-kit/product.md +++ b/content/hardware/09.kits/maker/make-your-uno-kit/product.md @@ -1,8 +1,8 @@ ---- -title: Make Your UNO Kit -url_shop: https://store.arduino.cc/products/make-your-uno-kit -url_guide: https://makeyouruno.arduino.cc/ -certifications: [CE] ---- - +--- +title: Make Your UNO Kit +url_shop: https://store.arduino.cc/products/make-your-uno-kit +url_guide: https://makeyouruno.arduino.cc/ +certifications: [CE] +--- + Build your own Arduino UNO from scratch using raw electronic components! The Make Your UNO Kit includes all electronic components needed to build the classic UNO board, a long with 3D instructions, video & text content to support your journey. \ No newline at end of file diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/tech-specs.md b/content/hardware/09.kits/maker/make-your-uno-kit/tech-specs.md similarity index 100% rename from content/hardware/08.kits/maker/make-your-uno-kit/tech-specs.md rename to content/hardware/09.kits/maker/make-your-uno-kit/tech-specs.md diff --git a/content/hardware/08.kits/maker/make-your-uno-kit/tech-specs.yml b/content/hardware/09.kits/maker/make-your-uno-kit/tech-specs.yml similarity index 94% rename from content/hardware/08.kits/maker/make-your-uno-kit/tech-specs.yml rename to content/hardware/09.kits/maker/make-your-uno-kit/tech-specs.yml index 9e331d609d..231c597ccb 100644 --- a/content/hardware/08.kits/maker/make-your-uno-kit/tech-specs.yml +++ b/content/hardware/09.kits/maker/make-your-uno-kit/tech-specs.yml @@ -1,52 +1,52 @@ -Kit: - Name: Arduino® Make Your UNO Kit - SKU: AKX00037 -PCB: - Board PCB Sheet: 1x - Shield PCB Sheet: 1x -Integrated Circuits: - ATmega328P: 1x - LM386 (amplifier): 1x - USB-C® Module: 1x -LEDs: - Green: 1x - Yellow: 4x -Resistors: - 10Ω: 1x - 1kΩ: 7x - 10kΩ: 2x - 100kΩ: 1x - 1MΩ: 2x -Capacitors: - Yellow 22pF: 3x - Yellow 47pF: 1x - Electrolytic Black 47μF: 3x - Electrolytic Black 220μF: 1x - Blue 100nF: 8x -Other Electronics: - Speaker 8Ω 1W: 1x - Crystal 16mHz, 20pF: 1x - Diode: 1x - Potentiometer 10kΩ: 6x - Potentiometer Knob: 6x - Pushbutton: 1x - LDO (3.3V): 1x - LDO (5V): 1x - Power Jack: 1x -Connectors: - UNO I/O Connector: 2x - ICPS Connector: 1x - ATmega328P Socket: 1x - 1x10 Pin Header: 1x - 1x8 Pin Header: 2x - 1x6 Pin Header: 1x -Mechanical Components: - M3 Spacer 12mm: 5x - M3 Screw 6mm: 11x - M3 Screw 12mm: 2x - M3 Bolt: 5x - - - - - +Kit: + Name: Arduino® Make Your UNO Kit + SKU: AKX00037 +PCB: + Board PCB Sheet: 1x + Shield PCB Sheet: 1x +Integrated Circuits: + ATmega328P: 1x + LM386 (amplifier): 1x + USB-C® Module: 1x +LEDs: + Green: 1x + Yellow: 4x +Resistors: + 10Ω: 1x + 1kΩ: 7x + 10kΩ: 2x + 100kΩ: 1x + 1MΩ: 2x +Capacitors: + Yellow 22pF: 3x + Yellow 47pF: 1x + Electrolytic Black 47μF: 3x + Electrolytic Black 220μF: 1x + Blue 100nF: 8x +Other Electronics: + Speaker 8Ω 1W: 1x + Crystal 16mHz, 20pF: 1x + Diode: 1x + Potentiometer 10kΩ: 6x + Potentiometer Knob: 6x + Pushbutton: 1x + LDO (3.3V): 1x + LDO (5V): 1x + Power Jack: 1x +Connectors: + UNO I/O Connector: 2x + ICPS Connector: 1x + ATmega328P Socket: 1x + 1x10 Pin Header: 1x + 1x8 Pin Header: 2x + 1x6 Pin Header: 1x +Mechanical Components: + M3 Spacer 12mm: 5x + M3 Screw 6mm: 11x + M3 Screw 12mm: 2x + M3 Bolt: 5x + + + + + diff --git a/content/hardware/08.kits/maker/iot-bundle/compatibility.yml b/content/hardware/09.kits/maker/plant-watering-kit/compatibility.yml similarity index 93% rename from content/hardware/08.kits/maker/iot-bundle/compatibility.yml rename to content/hardware/09.kits/maker/plant-watering-kit/compatibility.yml index fb978c4b11..68fc831f20 100644 --- a/content/hardware/08.kits/maker/iot-bundle/compatibility.yml +++ b/content/hardware/09.kits/maker/plant-watering-kit/compatibility.yml @@ -1,8 +1,8 @@ -software: - - arduino-ide - - arduino-cli - - web-editor -hardware: - shields: ~ - carriers: ~ +software: + - arduino-ide + - arduino-cli + - web-editor +hardware: + shields: ~ + carriers: ~ boards: ~ \ No newline at end of file diff --git a/content/hardware/08.kits/maker/plant-watering-kit/features.md b/content/hardware/09.kits/maker/plant-watering-kit/features.md similarity index 100% rename from content/hardware/08.kits/maker/plant-watering-kit/features.md rename to content/hardware/09.kits/maker/plant-watering-kit/features.md diff --git a/content/hardware/08.kits/maker/plant-watering-kit/image.svg b/content/hardware/09.kits/maker/plant-watering-kit/image.svg similarity index 100% rename from content/hardware/08.kits/maker/plant-watering-kit/image.svg rename to content/hardware/09.kits/maker/plant-watering-kit/image.svg diff --git a/content/hardware/08.kits/maker/plant-watering-kit/product.md b/content/hardware/09.kits/maker/plant-watering-kit/product.md similarity index 100% rename from content/hardware/08.kits/maker/plant-watering-kit/product.md rename to content/hardware/09.kits/maker/plant-watering-kit/product.md diff --git a/content/hardware/08.kits/maker/plant-watering-kit/tech-specs.md b/content/hardware/09.kits/maker/plant-watering-kit/tech-specs.md similarity index 100% rename from content/hardware/08.kits/maker/plant-watering-kit/tech-specs.md rename to content/hardware/09.kits/maker/plant-watering-kit/tech-specs.md diff --git a/content/hardware/08.kits/maker/plant-watering-kit/tech-specs.yml b/content/hardware/09.kits/maker/plant-watering-kit/tech-specs.yml similarity index 100% rename from content/hardware/08.kits/maker/plant-watering-kit/tech-specs.yml rename to content/hardware/09.kits/maker/plant-watering-kit/tech-specs.yml diff --git a/content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/cabletwisting.gif b/content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/cabletwisting.gif similarity index 100% rename from content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/cabletwisting.gif rename to content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/cabletwisting.gif diff --git a/content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/completesetup.jpg b/content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/completesetup.jpg similarity index 100% rename from content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/completesetup.jpg rename to content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/completesetup.jpg diff --git a/content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/coverpage.png b/content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/coverpage.png similarity index 100% rename from content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/coverpage.png rename to content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/coverpage.png diff --git a/content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/dashboard-overview.png b/content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/dashboard-overview.png similarity index 100% rename from content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/dashboard-overview.png rename to content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/dashboard-overview.png diff --git a/content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/dashboard_initial.png b/content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/dashboard_initial.png similarity index 100% rename from content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/dashboard_initial.png rename to content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/dashboard_initial.png diff --git a/content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step1.png b/content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step1.png similarity index 100% rename from content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step1.png rename to content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step1.png diff --git a/content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step2.png b/content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step2.png similarity index 100% rename from content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step2.png rename to content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step2.png diff --git a/content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step3.png b/content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step3.png similarity index 100% rename from content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step3.png rename to content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step3.png diff --git a/content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step4.png b/content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step4.png similarity index 100% rename from content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step4.png rename to content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step4.png diff --git a/content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step5.png b/content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step5.png similarity index 100% rename from content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step5.png rename to content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step5.png diff --git a/content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step6.png b/content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step6.png similarity index 100% rename from content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step6.png rename to content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step6.png diff --git a/content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step7.png b/content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step7.png similarity index 100% rename from content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step7.png rename to content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/step7.png diff --git a/content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/template_overview.png b/content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/template_overview.png similarity index 100% rename from content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/template_overview.png rename to content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/template_overview.png diff --git a/content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/things.png b/content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/things.png similarity index 100% rename from content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/things.png rename to content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/things.png diff --git a/content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/ziptie.gif b/content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/ziptie.gif similarity index 100% rename from content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/ziptie.gif rename to content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/assets/ziptie.gif diff --git a/content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/content.md b/content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/content.md similarity index 100% rename from content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/content.md rename to content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/content.md diff --git a/content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/hero-banner.png b/content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/hero-banner.png similarity index 100% rename from content/hardware/08.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/hero-banner.png rename to content/hardware/09.kits/maker/plant-watering-kit/tutorials/iot-smart-garden-setup-with-nanorp2040/hero-banner.png diff --git a/content/hardware/09.mega/boards/category.md b/content/hardware/10.mega/boards/category.md similarity index 100% rename from content/hardware/09.mega/boards/category.md rename to content/hardware/10.mega/boards/category.md diff --git a/content/hardware/09.mega/boards/due/certifications/Arduino_A000056-DoC_CE_without headers.pdf b/content/hardware/10.mega/boards/due/certifications/Arduino_A000056-DoC_CE_without headers.pdf similarity index 100% rename from content/hardware/09.mega/boards/due/certifications/Arduino_A000056-DoC_CE_without headers.pdf rename to content/hardware/10.mega/boards/due/certifications/Arduino_A000056-DoC_CE_without headers.pdf diff --git a/content/hardware/09.mega/boards/due/certifications/Arduino_A000062-DoC_CE.pdf b/content/hardware/10.mega/boards/due/certifications/Arduino_A000062-DoC_CE.pdf similarity index 100% rename from content/hardware/09.mega/boards/due/certifications/Arduino_A000062-DoC_CE.pdf rename to content/hardware/10.mega/boards/due/certifications/Arduino_A000062-DoC_CE.pdf diff --git a/content/hardware/09.mega/boards/due/certifications/Arduino_A000062-DoC_UKCA.pdf b/content/hardware/10.mega/boards/due/certifications/Arduino_A000062-DoC_UKCA.pdf similarity index 100% rename from content/hardware/09.mega/boards/due/certifications/Arduino_A000062-DoC_UKCA.pdf rename to content/hardware/10.mega/boards/due/certifications/Arduino_A000062-DoC_UKCA.pdf diff --git a/content/hardware/09.mega/boards/due/compatibility.yml b/content/hardware/10.mega/boards/due/compatibility.yml similarity index 100% rename from content/hardware/09.mega/boards/due/compatibility.yml rename to content/hardware/10.mega/boards/due/compatibility.yml diff --git a/content/hardware/09.mega/boards/due/downloads/A000056-full-pinout.pdf b/content/hardware/10.mega/boards/due/downloads/A000056-full-pinout.pdf similarity index 100% rename from content/hardware/09.mega/boards/due/downloads/A000056-full-pinout.pdf rename to content/hardware/10.mega/boards/due/downloads/A000056-full-pinout.pdf diff --git a/content/hardware/09.mega/boards/due/downloads/eagle-files.zip b/content/hardware/10.mega/boards/due/downloads/eagle-files.zip similarity index 100% rename from content/hardware/09.mega/boards/due/downloads/eagle-files.zip rename to content/hardware/10.mega/boards/due/downloads/eagle-files.zip diff --git a/content/hardware/09.mega/boards/due/downloads/fritzing.fzpz b/content/hardware/10.mega/boards/due/downloads/fritzing.fzpz similarity index 100% rename from content/hardware/09.mega/boards/due/downloads/fritzing.fzpz rename to content/hardware/10.mega/boards/due/downloads/fritzing.fzpz diff --git a/content/hardware/09.mega/boards/due/downloads/schematics.pdf b/content/hardware/10.mega/boards/due/downloads/schematics.pdf similarity index 100% rename from content/hardware/09.mega/boards/due/downloads/schematics.pdf rename to content/hardware/10.mega/boards/due/downloads/schematics.pdf diff --git a/content/hardware/09.mega/boards/due/essentials.md b/content/hardware/10.mega/boards/due/essentials.md similarity index 100% rename from content/hardware/09.mega/boards/due/essentials.md rename to content/hardware/10.mega/boards/due/essentials.md diff --git a/content/hardware/09.mega/boards/due/features.md b/content/hardware/10.mega/boards/due/features.md similarity index 100% rename from content/hardware/09.mega/boards/due/features.md rename to content/hardware/10.mega/boards/due/features.md diff --git a/content/hardware/09.mega/boards/due/image.svg b/content/hardware/10.mega/boards/due/image.svg similarity index 100% rename from content/hardware/09.mega/boards/due/image.svg rename to content/hardware/10.mega/boards/due/image.svg diff --git a/content/hardware/09.mega/boards/due/interactive/A000056-pinout.png b/content/hardware/10.mega/boards/due/interactive/A000056-pinout.png similarity index 100% rename from content/hardware/09.mega/boards/due/interactive/A000056-pinout.png rename to content/hardware/10.mega/boards/due/interactive/A000056-pinout.png diff --git a/content/hardware/09.mega/boards/due/interactive/A000062-altium.zip.gpg b/content/hardware/10.mega/boards/due/interactive/A000062-altium.zip.gpg similarity index 100% rename from content/hardware/09.mega/boards/due/interactive/A000062-altium.zip.gpg rename to content/hardware/10.mega/boards/due/interactive/A000062-altium.zip.gpg diff --git a/content/hardware/09.mega/boards/due/product.md b/content/hardware/10.mega/boards/due/product.md similarity index 100% rename from content/hardware/09.mega/boards/due/product.md rename to content/hardware/10.mega/boards/due/product.md diff --git a/content/hardware/09.mega/boards/due/suggestions.md b/content/hardware/10.mega/boards/due/suggestions.md similarity index 100% rename from content/hardware/09.mega/boards/due/suggestions.md rename to content/hardware/10.mega/boards/due/suggestions.md diff --git a/content/hardware/09.mega/boards/due/tech-specs.md b/content/hardware/10.mega/boards/due/tech-specs.md similarity index 100% rename from content/hardware/09.mega/boards/due/tech-specs.md rename to content/hardware/10.mega/boards/due/tech-specs.md diff --git a/content/hardware/09.mega/boards/due/tech-specs.yml b/content/hardware/10.mega/boards/due/tech-specs.yml similarity index 100% rename from content/hardware/09.mega/boards/due/tech-specs.yml rename to content/hardware/10.mega/boards/due/tech-specs.yml diff --git a/content/hardware/09.mega/boards/due/tutorials/due-extended-spi/due-extended-spi.md b/content/hardware/10.mega/boards/due/tutorials/due-extended-spi/due-extended-spi.md similarity index 100% rename from content/hardware/09.mega/boards/due/tutorials/due-extended-spi/due-extended-spi.md rename to content/hardware/10.mega/boards/due/tutorials/due-extended-spi/due-extended-spi.md diff --git a/content/hardware/09.mega/boards/due/tutorials/due-motor-shield-dc/assets/DueMotorShieldFan.jpg b/content/hardware/10.mega/boards/due/tutorials/due-motor-shield-dc/assets/DueMotorShieldFan.jpg similarity index 100% rename from content/hardware/09.mega/boards/due/tutorials/due-motor-shield-dc/assets/DueMotorShieldFan.jpg rename to content/hardware/10.mega/boards/due/tutorials/due-motor-shield-dc/assets/DueMotorShieldFan.jpg diff --git a/content/hardware/09.mega/boards/due/tutorials/due-motor-shield-dc/due-motor-shield-dc.md b/content/hardware/10.mega/boards/due/tutorials/due-motor-shield-dc/due-motor-shield-dc.md similarity index 100% rename from content/hardware/09.mega/boards/due/tutorials/due-motor-shield-dc/due-motor-shield-dc.md rename to content/hardware/10.mega/boards/due/tutorials/due-motor-shield-dc/due-motor-shield-dc.md diff --git a/content/hardware/09.mega/boards/due/tutorials/keyboard-controller/keyboard-controller.md b/content/hardware/10.mega/boards/due/tutorials/keyboard-controller/keyboard-controller.md similarity index 100% rename from content/hardware/09.mega/boards/due/tutorials/keyboard-controller/keyboard-controller.md rename to content/hardware/10.mega/boards/due/tutorials/keyboard-controller/keyboard-controller.md diff --git a/content/hardware/09.mega/boards/due/tutorials/mouse-controller/assets/DueUSBPorts.png b/content/hardware/10.mega/boards/due/tutorials/mouse-controller/assets/DueUSBPorts.png similarity index 100% rename from content/hardware/09.mega/boards/due/tutorials/mouse-controller/assets/DueUSBPorts.png rename to content/hardware/10.mega/boards/due/tutorials/mouse-controller/assets/DueUSBPorts.png diff --git a/content/hardware/09.mega/boards/due/tutorials/mouse-controller/mouse-controller.md b/content/hardware/10.mega/boards/due/tutorials/mouse-controller/mouse-controller.md similarity index 100% rename from content/hardware/09.mega/boards/due/tutorials/mouse-controller/mouse-controller.md rename to content/hardware/10.mega/boards/due/tutorials/mouse-controller/mouse-controller.md diff --git a/content/hardware/09.mega/boards/due/tutorials/multiple-blinks/content.md b/content/hardware/10.mega/boards/due/tutorials/multiple-blinks/content.md similarity index 100% rename from content/hardware/09.mega/boards/due/tutorials/multiple-blinks/content.md rename to content/hardware/10.mega/boards/due/tutorials/multiple-blinks/content.md diff --git a/content/hardware/09.mega/boards/due/tutorials/simple-waveform-generator/assets/DueSimpleWaveform_fritzing.png b/content/hardware/10.mega/boards/due/tutorials/simple-waveform-generator/assets/DueSimpleWaveform_fritzing.png similarity index 100% rename from content/hardware/09.mega/boards/due/tutorials/simple-waveform-generator/assets/DueSimpleWaveform_fritzing.png rename to content/hardware/10.mega/boards/due/tutorials/simple-waveform-generator/assets/DueSimpleWaveform_fritzing.png diff --git a/content/hardware/09.mega/boards/due/tutorials/simple-waveform-generator/assets/Duewaveforms.jpg b/content/hardware/10.mega/boards/due/tutorials/simple-waveform-generator/assets/Duewaveforms.jpg similarity index 100% rename from content/hardware/09.mega/boards/due/tutorials/simple-waveform-generator/assets/Duewaveforms.jpg rename to content/hardware/10.mega/boards/due/tutorials/simple-waveform-generator/assets/Duewaveforms.jpg diff --git a/content/hardware/09.mega/boards/due/tutorials/simple-waveform-generator/keyboard-controller/assets/DueUSBPorts.png b/content/hardware/10.mega/boards/due/tutorials/simple-waveform-generator/keyboard-controller/assets/DueUSBPorts.png similarity index 100% rename from content/hardware/09.mega/boards/due/tutorials/simple-waveform-generator/keyboard-controller/assets/DueUSBPorts.png rename to content/hardware/10.mega/boards/due/tutorials/simple-waveform-generator/keyboard-controller/assets/DueUSBPorts.png diff --git a/content/hardware/09.mega/boards/due/tutorials/simple-waveform-generator/keyboard-controller/keyboard-controller.md b/content/hardware/10.mega/boards/due/tutorials/simple-waveform-generator/keyboard-controller/keyboard-controller.md similarity index 100% rename from content/hardware/09.mega/boards/due/tutorials/simple-waveform-generator/keyboard-controller/keyboard-controller.md rename to content/hardware/10.mega/boards/due/tutorials/simple-waveform-generator/keyboard-controller/keyboard-controller.md diff --git a/content/hardware/09.mega/boards/due/tutorials/simple-waveform-generator/simple-waveform-generator.md b/content/hardware/10.mega/boards/due/tutorials/simple-waveform-generator/simple-waveform-generator.md similarity index 97% rename from content/hardware/09.mega/boards/due/tutorials/simple-waveform-generator/simple-waveform-generator.md rename to content/hardware/10.mega/boards/due/tutorials/simple-waveform-generator/simple-waveform-generator.md index 7ebc12fb00..b495daff60 100644 --- a/content/hardware/09.mega/boards/due/tutorials/simple-waveform-generator/simple-waveform-generator.md +++ b/content/hardware/10.mega/boards/due/tutorials/simple-waveform-generator/simple-waveform-generator.md @@ -1,249 +1,249 @@ ---- -compatible-products: [due] -title: 'Simple Waveform Generator with Arduino Due' -difficulty: intermediate -description: 'Generate waveforms by using the Arduino Due and its DAC features' -tags: - - Waveforms - - Frequency -libraries: - - name: Waveforms - url: https://github.com/hoilett/Waveforms/blob/master/Waveforms.h -hardware: - - hardware/02.hero/boards/due -software: - - ide-v1 - - ide-v2 - - web-editor -author: "Arduino" ---- - -## Introduction - -This tutorial shows how to make a simple waveform generator by using the DAC features of the Arduino Due board. - -With push buttons, you will be able to choose a waveform shape (sine, triangular, sawtooth, or square) that we will send to to send to the DAC0 and DAC1 channels and change the frequency of the generated signal with a potentiometer. - -## Goals - -- Create a simple waveform generator. -- Learn about DAC features on the DUE board. - -## Hardware & Software Needed - -- [Arduino Due](https://store.arduino.cc/arduino-due) -- 10K Ω potentiometer -- 2x push buttons -- 2x 10K Ω resistors -- Jumper wires -- Breadboard -- Arduino IDE ([online](https://create.arduino.cc/) or [offline](https://www.arduino.cc/en/main/software)). -- [Waveforms library](https://github.com/hoilett/Waveforms/blob/master/Waveforms.h) -- Oscilloscope (optional) - -## Circuit - -Connect power and ground on your breadboard to the Arduino. In the image below, the red (power) and black (ground) wires connect to the two long vertical rows on the breadboard, providing access to 3.3V and ground. - -Connect a wire from digital pin 2 to one leg of a pushbutton. That same leg of the button connects through a pull-down resistor (10-kilohm) to ground. The other leg of the button connects to the 3.3V power. - -Wire up another button in the same fashion, but to digital pin 3. - -Hook up the potentiometer by connecting one side to power and the other side to ground. The pin in the middle of the potentiometer goes to analog input 0. - -Pins DAC0 and DAC1 will generate the waveform. You can use an oscilloscope to visualize the generated waveforms. - -![The circuit for this tutorial.](assets/DueSimpleWaveform_fritzing.png) - -## Programming the Board - -The waveforms are stored inside a two-dimensional array where each row represent a different waveform shape. The waveform samples are contained inside the columns, so you can access the waveform table using two indexes: - -```arduino -waveformsTable[waveformIndex][samplesIndex] -``` - -With the waveformIndex array, you choose which samples to read. By incrementing the sampleIndex array from 0 to the maximum in a fixed time, you will create the waveform shape. Repeating this procedure continuously and sending the samples values on the DAC output will give you a constant signal. - -In order to choose the waveform shape with a push button, match the button press to the waveformIndex increment. You can use the interrupts, triggering the the press event using the RISING option for easy access. So, when the Arduino Due sees a rising edge on the button pin, it will execute the function linked to the interrupt matched with the button: - -`void waveCh0_select()` and `void waveCh1_select()` - -The potentiometer connected to analog pin 0 is used to choose the sample rate and the period of the signal is given by the sample rate multiplied for the number of the samples. - -Taking into account the time for the instructions to execute, and adding the time for the analog input (around 40 µS to read the pot), maximum frequency for the signal with this sketch is around 170 Hz. - -The sketch is composed of two files. One has the two-dimensional arrays, with the table of the samples for all the waveforms for legibility. Download the attached file from [GitHub](https://github.com/hoilett/Waveforms/blob/master/Waveforms.h), or if you want to start from scratch you have to create a new folder inside your sketchbook folder and place the two files inside. The sketch file must have the same name of the folder, and the file with the sample table must be named `"Waveforms.h"`. - - -### Code - -**FunctionGenerator.ino** - -```arduino -/* - Simple Waveform generator with Arduino Due - - * connect two push buttons to the digital pins 2 and 3 - with a 10 kilohm pulldown resistor to choose the waveform - to send to the DAC0 and DAC1 channels - * connect a 10 kilohm potentiometer to A0 to control the - signal frequency - - */ - -#include "Waveforms.h" - -#define oneHzSample 1000000/maxSamplesNum // sample for the 1Hz signal expressed in microseconds - -const int button0 = 2, button1 = 3; -volatile int wave0 = 0, wave1 = 0; - -int i = 0; -int sample; - - -void setup() { - analogWriteResolution(12); // set the analog output resolution to 12 bit (4096 levels) - analogReadResolution(12); // set the analog input resolution to 12 bit - - attachInterrupt(button0, wave0Select, RISING); // Interrupt attached to the button connected to pin 2 - attachInterrupt(button1, wave1Select, RISING); // Interrupt attached to the button connected to pin 3 -} - -void loop() { - // Read the the potentiometer and map the value between the maximum and the minimum sample available - // 1 Hz is the minimum freq for the complete wave - // 170 Hz is the maximum freq for the complete wave. Measured considering the loop and the analogRead() time - sample = map(analogRead(A0), 0, 4095, 0, oneHzSample); - sample = constrain(t_sample, 0, oneHzSample); - - analogWrite(DAC0, waveformsTable[wave0][i]); // write the selected waveform on DAC0 - analogWrite(DAC1, waveformsTable[wave1][i]); // write the selected waveform on DAC1 - - i++; - if(i == maxSamplesNum) // Reset the counter to repeat the wave - i = 0; - - delayMicroseconds(sample); // Hold the sample value for the sample time -} - -// function hooked to the interrupt on digital pin 2 -void wave0Select() { - wave0++; - if(wave0 == 4) - wave0 = 0; -} - -// function hooked to the interrupt on digital pin 3 -void wave1Select() { - wave1++; - if(wave1 == 4) - wave1 = 0; -} -``` - -**Waveforms.h** - -```arduino - -#ifndef _Waveforms_h_ -#define _Waveforms_h_ - -#define maxWaveform 4 -#define maxSamplesNum 120 - -static int waveformsTable[maxWaveform][maxSamplesNum] = { - // Sin wave - { - 0x7ff, 0x86a, 0x8d5, 0x93f, 0x9a9, 0xa11, 0xa78, 0xadd, 0xb40, 0xba1, - 0xbff, 0xc5a, 0xcb2, 0xd08, 0xd59, 0xda7, 0xdf1, 0xe36, 0xe77, 0xeb4, - 0xeec, 0xf1f, 0xf4d, 0xf77, 0xf9a, 0xfb9, 0xfd2, 0xfe5, 0xff3, 0xffc, - 0xfff, 0xffc, 0xff3, 0xfe5, 0xfd2, 0xfb9, 0xf9a, 0xf77, 0xf4d, 0xf1f, - 0xeec, 0xeb4, 0xe77, 0xe36, 0xdf1, 0xda7, 0xd59, 0xd08, 0xcb2, 0xc5a, - 0xbff, 0xba1, 0xb40, 0xadd, 0xa78, 0xa11, 0x9a9, 0x93f, 0x8d5, 0x86a, - 0x7ff, 0x794, 0x729, 0x6bf, 0x655, 0x5ed, 0x586, 0x521, 0x4be, 0x45d, - 0x3ff, 0x3a4, 0x34c, 0x2f6, 0x2a5, 0x257, 0x20d, 0x1c8, 0x187, 0x14a, - 0x112, 0xdf, 0xb1, 0x87, 0x64, 0x45, 0x2c, 0x19, 0xb, 0x2, - 0x0, 0x2, 0xb, 0x19, 0x2c, 0x45, 0x64, 0x87, 0xb1, 0xdf, - 0x112, 0x14a, 0x187, 0x1c8, 0x20d, 0x257, 0x2a5, 0x2f6, 0x34c, 0x3a4, - 0x3ff, 0x45d, 0x4be, 0x521, 0x586, 0x5ed, 0x655, 0x6bf, 0x729, 0x794 - } - , - - // Triangular wave - { - 0x44, 0x88, 0xcc, 0x110, 0x154, 0x198, 0x1dc, 0x220, 0x264, 0x2a8, - 0x2ec, 0x330, 0x374, 0x3b8, 0x3fc, 0x440, 0x484, 0x4c8, 0x50c, 0x550, - 0x594, 0x5d8, 0x61c, 0x660, 0x6a4, 0x6e8, 0x72c, 0x770, 0x7b4, 0x7f8, - 0x83c, 0x880, 0x8c4, 0x908, 0x94c, 0x990, 0x9d4, 0xa18, 0xa5c, 0xaa0, - 0xae4, 0xb28, 0xb6c, 0xbb0, 0xbf4, 0xc38, 0xc7c, 0xcc0, 0xd04, 0xd48, - 0xd8c, 0xdd0, 0xe14, 0xe58, 0xe9c, 0xee0, 0xf24, 0xf68, 0xfac, 0xff0, - 0xfac, 0xf68, 0xf24, 0xee0, 0xe9c, 0xe58, 0xe14, 0xdd0, 0xd8c, 0xd48, - 0xd04, 0xcc0, 0xc7c, 0xc38, 0xbf4, 0xbb0, 0xb6c, 0xb28, 0xae4, 0xaa0, - 0xa5c, 0xa18, 0x9d4, 0x990, 0x94c, 0x908, 0x8c4, 0x880, 0x83c, 0x7f8, - 0x7b4, 0x770, 0x72c, 0x6e8, 0x6a4, 0x660, 0x61c, 0x5d8, 0x594, 0x550, - 0x50c, 0x4c8, 0x484, 0x440, 0x3fc, 0x3b8, 0x374, 0x330, 0x2ec, 0x2a8, - 0x264, 0x220, 0x1dc, 0x198, 0x154, 0x110, 0xcc, 0x88, 0x44, 0x0 - } - , - - // Sawtooth wave - { - 0x22, 0x44, 0x66, 0x88, 0xaa, 0xcc, 0xee, 0x110, 0x132, 0x154, - 0x176, 0x198, 0x1ba, 0x1dc, 0x1fe, 0x220, 0x242, 0x264, 0x286, 0x2a8, - 0x2ca, 0x2ec, 0x30e, 0x330, 0x352, 0x374, 0x396, 0x3b8, 0x3da, 0x3fc, - 0x41e, 0x440, 0x462, 0x484, 0x4a6, 0x4c8, 0x4ea, 0x50c, 0x52e, 0x550, - 0x572, 0x594, 0x5b6, 0x5d8, 0x5fa, 0x61c, 0x63e, 0x660, 0x682, 0x6a4, - 0x6c6, 0x6e8, 0x70a, 0x72c, 0x74e, 0x770, 0x792, 0x7b4, 0x7d6, 0x7f8, - 0x81a, 0x83c, 0x85e, 0x880, 0x8a2, 0x8c4, 0x8e6, 0x908, 0x92a, 0x94c, - 0x96e, 0x990, 0x9b2, 0x9d4, 0x9f6, 0xa18, 0xa3a, 0xa5c, 0xa7e, 0xaa0, - 0xac2, 0xae4, 0xb06, 0xb28, 0xb4a, 0xb6c, 0xb8e, 0xbb0, 0xbd2, 0xbf4, - 0xc16, 0xc38, 0xc5a, 0xc7c, 0xc9e, 0xcc0, 0xce2, 0xd04, 0xd26, 0xd48, - 0xd6a, 0xd8c, 0xdae, 0xdd0, 0xdf2, 0xe14, 0xe36, 0xe58, 0xe7a, 0xe9c, - 0xebe, 0xee0, 0xf02, 0xf24, 0xf46, 0xf68, 0xf8a, 0xfac, 0xfce, 0xff0 - } - , - - // Square wave - { - 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, - 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, - 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, - 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, - 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, - 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 - } - -}; - -#endif -``` - - -## Testing It Out - -After you have uploaded the code, use the pushbuttons that you have hooked up to the breadboard to generate waveforms. If you have an oscilloscope, you can use it to visualize the different waveforms that you generate. You can control the signal frequency by using the potentiometer connected to `A0`. - -![Waveforms shown on an oscilloscope](assets/Duewaveforms.jpg) - - -### Troubleshoot - -If the code is not working, there are some common issues we can troubleshoot: - -- The wiring is incorrect. -- You have not installed or included all of the libraries. -- Make sure there are no missing curly brackets {}. -- We have not selected the right port and board. - - -## Conclusion - +--- +compatible-products: [due] +title: 'Simple Waveform Generator with Arduino Due' +difficulty: intermediate +description: 'Generate waveforms by using the Arduino Due and its DAC features' +tags: + - Waveforms + - Frequency +libraries: + - name: Waveforms + url: https://github.com/hoilett/Waveforms/blob/master/Waveforms.h +hardware: + - hardware/02.hero/boards/due +software: + - ide-v1 + - ide-v2 + - web-editor +author: "Arduino" +--- + +## Introduction + +This tutorial shows how to make a simple waveform generator by using the DAC features of the Arduino Due board. + +With push buttons, you will be able to choose a waveform shape (sine, triangular, sawtooth, or square) that we will send to to send to the DAC0 and DAC1 channels and change the frequency of the generated signal with a potentiometer. + +## Goals + +- Create a simple waveform generator. +- Learn about DAC features on the DUE board. + +## Hardware & Software Needed + +- [Arduino Due](https://store.arduino.cc/arduino-due) +- 10K Ω potentiometer +- 2x push buttons +- 2x 10K Ω resistors +- Jumper wires +- Breadboard +- Arduino IDE ([online](https://create.arduino.cc/) or [offline](https://www.arduino.cc/en/main/software)). +- [Waveforms library](https://github.com/hoilett/Waveforms/blob/master/Waveforms.h) +- Oscilloscope (optional) + +## Circuit + +Connect power and ground on your breadboard to the Arduino. In the image below, the red (power) and black (ground) wires connect to the two long vertical rows on the breadboard, providing access to 3.3V and ground. + +Connect a wire from digital pin 2 to one leg of a pushbutton. That same leg of the button connects through a pull-down resistor (10-kilohm) to ground. The other leg of the button connects to the 3.3V power. + +Wire up another button in the same fashion, but to digital pin 3. + +Hook up the potentiometer by connecting one side to power and the other side to ground. The pin in the middle of the potentiometer goes to analog input 0. + +Pins DAC0 and DAC1 will generate the waveform. You can use an oscilloscope to visualize the generated waveforms. + +![The circuit for this tutorial.](assets/DueSimpleWaveform_fritzing.png) + +## Programming the Board + +The waveforms are stored inside a two-dimensional array where each row represent a different waveform shape. The waveform samples are contained inside the columns, so you can access the waveform table using two indexes: + +```arduino +waveformsTable[waveformIndex][samplesIndex] +``` + +With the waveformIndex array, you choose which samples to read. By incrementing the sampleIndex array from 0 to the maximum in a fixed time, you will create the waveform shape. Repeating this procedure continuously and sending the samples values on the DAC output will give you a constant signal. + +In order to choose the waveform shape with a push button, match the button press to the waveformIndex increment. You can use the interrupts, triggering the the press event using the RISING option for easy access. So, when the Arduino Due sees a rising edge on the button pin, it will execute the function linked to the interrupt matched with the button: + +`void waveCh0_select()` and `void waveCh1_select()` + +The potentiometer connected to analog pin 0 is used to choose the sample rate and the period of the signal is given by the sample rate multiplied for the number of the samples. + +Taking into account the time for the instructions to execute, and adding the time for the analog input (around 40 µS to read the pot), maximum frequency for the signal with this sketch is around 170 Hz. + +The sketch is composed of two files. One has the two-dimensional arrays, with the table of the samples for all the waveforms for legibility. Download the attached file from [GitHub](https://github.com/hoilett/Waveforms/blob/master/Waveforms.h), or if you want to start from scratch you have to create a new folder inside your sketchbook folder and place the two files inside. The sketch file must have the same name of the folder, and the file with the sample table must be named `"Waveforms.h"`. + + +### Code + +**FunctionGenerator.ino** + +```arduino +/* + Simple Waveform generator with Arduino Due + + * connect two push buttons to the digital pins 2 and 3 + with a 10 kilohm pulldown resistor to choose the waveform + to send to the DAC0 and DAC1 channels + * connect a 10 kilohm potentiometer to A0 to control the + signal frequency + + */ + +#include "Waveforms.h" + +#define oneHzSample 1000000/maxSamplesNum // sample for the 1Hz signal expressed in microseconds + +const int button0 = 2, button1 = 3; +volatile int wave0 = 0, wave1 = 0; + +int i = 0; +int sample; + + +void setup() { + analogWriteResolution(12); // set the analog output resolution to 12 bit (4096 levels) + analogReadResolution(12); // set the analog input resolution to 12 bit + + attachInterrupt(button0, wave0Select, RISING); // Interrupt attached to the button connected to pin 2 + attachInterrupt(button1, wave1Select, RISING); // Interrupt attached to the button connected to pin 3 +} + +void loop() { + // Read the the potentiometer and map the value between the maximum and the minimum sample available + // 1 Hz is the minimum freq for the complete wave + // 170 Hz is the maximum freq for the complete wave. Measured considering the loop and the analogRead() time + sample = map(analogRead(A0), 0, 4095, 0, oneHzSample); + sample = constrain(t_sample, 0, oneHzSample); + + analogWrite(DAC0, waveformsTable[wave0][i]); // write the selected waveform on DAC0 + analogWrite(DAC1, waveformsTable[wave1][i]); // write the selected waveform on DAC1 + + i++; + if(i == maxSamplesNum) // Reset the counter to repeat the wave + i = 0; + + delayMicroseconds(sample); // Hold the sample value for the sample time +} + +// function hooked to the interrupt on digital pin 2 +void wave0Select() { + wave0++; + if(wave0 == 4) + wave0 = 0; +} + +// function hooked to the interrupt on digital pin 3 +void wave1Select() { + wave1++; + if(wave1 == 4) + wave1 = 0; +} +``` + +**Waveforms.h** + +```arduino + +#ifndef _Waveforms_h_ +#define _Waveforms_h_ + +#define maxWaveform 4 +#define maxSamplesNum 120 + +static int waveformsTable[maxWaveform][maxSamplesNum] = { + // Sin wave + { + 0x7ff, 0x86a, 0x8d5, 0x93f, 0x9a9, 0xa11, 0xa78, 0xadd, 0xb40, 0xba1, + 0xbff, 0xc5a, 0xcb2, 0xd08, 0xd59, 0xda7, 0xdf1, 0xe36, 0xe77, 0xeb4, + 0xeec, 0xf1f, 0xf4d, 0xf77, 0xf9a, 0xfb9, 0xfd2, 0xfe5, 0xff3, 0xffc, + 0xfff, 0xffc, 0xff3, 0xfe5, 0xfd2, 0xfb9, 0xf9a, 0xf77, 0xf4d, 0xf1f, + 0xeec, 0xeb4, 0xe77, 0xe36, 0xdf1, 0xda7, 0xd59, 0xd08, 0xcb2, 0xc5a, + 0xbff, 0xba1, 0xb40, 0xadd, 0xa78, 0xa11, 0x9a9, 0x93f, 0x8d5, 0x86a, + 0x7ff, 0x794, 0x729, 0x6bf, 0x655, 0x5ed, 0x586, 0x521, 0x4be, 0x45d, + 0x3ff, 0x3a4, 0x34c, 0x2f6, 0x2a5, 0x257, 0x20d, 0x1c8, 0x187, 0x14a, + 0x112, 0xdf, 0xb1, 0x87, 0x64, 0x45, 0x2c, 0x19, 0xb, 0x2, + 0x0, 0x2, 0xb, 0x19, 0x2c, 0x45, 0x64, 0x87, 0xb1, 0xdf, + 0x112, 0x14a, 0x187, 0x1c8, 0x20d, 0x257, 0x2a5, 0x2f6, 0x34c, 0x3a4, + 0x3ff, 0x45d, 0x4be, 0x521, 0x586, 0x5ed, 0x655, 0x6bf, 0x729, 0x794 + } + , + + // Triangular wave + { + 0x44, 0x88, 0xcc, 0x110, 0x154, 0x198, 0x1dc, 0x220, 0x264, 0x2a8, + 0x2ec, 0x330, 0x374, 0x3b8, 0x3fc, 0x440, 0x484, 0x4c8, 0x50c, 0x550, + 0x594, 0x5d8, 0x61c, 0x660, 0x6a4, 0x6e8, 0x72c, 0x770, 0x7b4, 0x7f8, + 0x83c, 0x880, 0x8c4, 0x908, 0x94c, 0x990, 0x9d4, 0xa18, 0xa5c, 0xaa0, + 0xae4, 0xb28, 0xb6c, 0xbb0, 0xbf4, 0xc38, 0xc7c, 0xcc0, 0xd04, 0xd48, + 0xd8c, 0xdd0, 0xe14, 0xe58, 0xe9c, 0xee0, 0xf24, 0xf68, 0xfac, 0xff0, + 0xfac, 0xf68, 0xf24, 0xee0, 0xe9c, 0xe58, 0xe14, 0xdd0, 0xd8c, 0xd48, + 0xd04, 0xcc0, 0xc7c, 0xc38, 0xbf4, 0xbb0, 0xb6c, 0xb28, 0xae4, 0xaa0, + 0xa5c, 0xa18, 0x9d4, 0x990, 0x94c, 0x908, 0x8c4, 0x880, 0x83c, 0x7f8, + 0x7b4, 0x770, 0x72c, 0x6e8, 0x6a4, 0x660, 0x61c, 0x5d8, 0x594, 0x550, + 0x50c, 0x4c8, 0x484, 0x440, 0x3fc, 0x3b8, 0x374, 0x330, 0x2ec, 0x2a8, + 0x264, 0x220, 0x1dc, 0x198, 0x154, 0x110, 0xcc, 0x88, 0x44, 0x0 + } + , + + // Sawtooth wave + { + 0x22, 0x44, 0x66, 0x88, 0xaa, 0xcc, 0xee, 0x110, 0x132, 0x154, + 0x176, 0x198, 0x1ba, 0x1dc, 0x1fe, 0x220, 0x242, 0x264, 0x286, 0x2a8, + 0x2ca, 0x2ec, 0x30e, 0x330, 0x352, 0x374, 0x396, 0x3b8, 0x3da, 0x3fc, + 0x41e, 0x440, 0x462, 0x484, 0x4a6, 0x4c8, 0x4ea, 0x50c, 0x52e, 0x550, + 0x572, 0x594, 0x5b6, 0x5d8, 0x5fa, 0x61c, 0x63e, 0x660, 0x682, 0x6a4, + 0x6c6, 0x6e8, 0x70a, 0x72c, 0x74e, 0x770, 0x792, 0x7b4, 0x7d6, 0x7f8, + 0x81a, 0x83c, 0x85e, 0x880, 0x8a2, 0x8c4, 0x8e6, 0x908, 0x92a, 0x94c, + 0x96e, 0x990, 0x9b2, 0x9d4, 0x9f6, 0xa18, 0xa3a, 0xa5c, 0xa7e, 0xaa0, + 0xac2, 0xae4, 0xb06, 0xb28, 0xb4a, 0xb6c, 0xb8e, 0xbb0, 0xbd2, 0xbf4, + 0xc16, 0xc38, 0xc5a, 0xc7c, 0xc9e, 0xcc0, 0xce2, 0xd04, 0xd26, 0xd48, + 0xd6a, 0xd8c, 0xdae, 0xdd0, 0xdf2, 0xe14, 0xe36, 0xe58, 0xe7a, 0xe9c, + 0xebe, 0xee0, 0xf02, 0xf24, 0xf46, 0xf68, 0xf8a, 0xfac, 0xfce, 0xff0 + } + , + + // Square wave + { + 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, + 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, + 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, + 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, + 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, + 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 + } + +}; + +#endif +``` + + +## Testing It Out + +After you have uploaded the code, use the pushbuttons that you have hooked up to the breadboard to generate waveforms. If you have an oscilloscope, you can use it to visualize the different waveforms that you generate. You can control the signal frequency by using the potentiometer connected to `A0`. + +![Waveforms shown on an oscilloscope](assets/Duewaveforms.jpg) + + +### Troubleshoot + +If the code is not working, there are some common issues we can troubleshoot: + +- The wiring is incorrect. +- You have not installed or included all of the libraries. +- Make sure there are no missing curly brackets {}. +- We have not selected the right port and board. + + +## Conclusion + In this example, we have learned how to generate waveforms by using the DAC features of the Arduino Due. \ No newline at end of file diff --git a/content/hardware/09.mega/boards/due/tutorials/upgrading-16u2-due/assets/Due16U2UpgradeSPI.jpg b/content/hardware/10.mega/boards/due/tutorials/upgrading-16u2-due/assets/Due16U2UpgradeSPI.jpg similarity index 100% rename from content/hardware/09.mega/boards/due/tutorials/upgrading-16u2-due/assets/Due16U2UpgradeSPI.jpg rename to content/hardware/10.mega/boards/due/tutorials/upgrading-16u2-due/assets/Due16U2UpgradeSPI.jpg diff --git a/content/hardware/09.mega/boards/due/tutorials/upgrading-16u2-due/upgrading-16u2-due.md b/content/hardware/10.mega/boards/due/tutorials/upgrading-16u2-due/upgrading-16u2-due.md similarity index 97% rename from content/hardware/09.mega/boards/due/tutorials/upgrading-16u2-due/upgrading-16u2-due.md rename to content/hardware/10.mega/boards/due/tutorials/upgrading-16u2-due/upgrading-16u2-due.md index 3ff4f9d12a..736931626d 100644 --- a/content/hardware/09.mega/boards/due/tutorials/upgrading-16u2-due/upgrading-16u2-due.md +++ b/content/hardware/10.mega/boards/due/tutorials/upgrading-16u2-due/upgrading-16u2-due.md @@ -1,90 +1,90 @@ ---- -title: 'Upgrading Firmware of the Arduino Due Programming Port 16U2' -difficulty: beginner -compatible-products: [due] -description: 'In this tutorial you will update the ATmega16U2 firmware using an Arduino UNO or Mega as an AVR-ISP (in-system programmer).' -author: 'Arduino' -tags: - - Firmware -hardware: - - hardware/02.hero/boards/due -software: - - ide-v1 - - web-editor ---- - -## Introduction - -Behind the Arduino Due Programming port there is an AVR microcontroller (ATmega16U2) which converts the USB signals coming from the computer to the first serial port of the SAM3X. In this tutorial you will update the ATmega16U2 firmware using an Arduino UNO or Mega as an AVR-ISP (in-system programmer). - -## Instructions - -To use your Arduino board to burn a bootloader onto an AVR, you need to follow a few simple steps. - -**1.** Open the **ArduinoISP** sketch (in **Examples**) in the Arduino IDE. - -**2.** Select the items in the **Tools > Board** and **Serial Port** menus that correspond to the board you are using as the programmer (not the board being programmed). - -**3.** Upload the ArduinoISP sketch. - -**4.** Connect a 10uF (micro Farad) capacitor between the GND and RESET pin. - -**5.** Connect the following pins from the Arduino UNO (or Mega) to the ATmega16U2 ICSP connector: - -||UNO|Mega|16U2 ICSP| -|-|-|-|-| -|SCK|13|52|3| -|MISO|12|50|1| -|MOSI|11|51|4| -|Reset|10|10|5| -|GND|GND|GND|6| -|+5V|5V|5V|2| - -![The Pins of the Due board](./assets/Due16U2UpgradeSPI.jpg) - -The Arduino Due will take power from the Arduino UNO set as AVR programmer. If you want further details on the connections between the UNO/Mega and the ICSP connector of the target please look this tutorial: [Arduino as AVR-ISP](https://www.arduino.cc/en/Tutorial/ArduinoISP). - -## Upgrade the Firmware Using Avrdude - -To upgrade the firmware you need to use a command line tool called "avrdude", that is already included inside your IDE folder. You find it at the following path: `/path_to_arduino/arduino.1.5.x/hardware/tools` - - -The firmware to upload on the 16U2 is in a binary format that has the .hex extension. - -### Linux and Mac - -First thing to do is to go to the directory that contains the avrdude tools that comes with the IDE. For doing that, open a terminal window and type: - -`cd /home/USER/arduino-1.5.2/hardware/tools` - -the path to reach the Arduino directory depends on where you placed it. Then you can execute the avrdude tool specifying all the parameters you need to flash the firmware. Here is the complete line: - - -``` -/home/USER/arduino-1.5.2/hardware/tools$ ./avrdude -C avrdude.conf -c arduino -P /dev/ttyACM0 -b 19200 -p m16u2 -vvv -U flash:w:/home/USER/newFirmware/16u2.hex:i -``` - -### Windows - -First thing to do is to go to the directory that contains the avrdude tools that comes with the IDE. For doing that open a command prompt window clicking on Start and typing `cmd` then press enter. - -Once the command prompt is open should display a row like this: `C:\Users\USER` then type the following command to move inside the Arduino folder (it depends where you placed it): `cd arduino-1.5.2\hardware\tools`. - -the path to reach the Arduino directory depends where you placed it. Then you can execute the avrdude tool specifying all the parameters you need to flash the firmware. Here is the complete line: - - -``` -arduino-1.5.2/hardware/tool> avrdude.exe -C avrdude.conf -c arduino -P /dev/ttyACM0 -b 19200 -p m16u2 -vvv -U flash:w:/home/USER/newFirmware/16u2.hex:i -``` - -### Avrdude Parameter Explanations - -| | | -|-|-| -|`-C avrdude.conf`|load the configuration file for using the Arduino UNO as programmer| -|`-c arduino`|specify the programmer you want to use| -|`-P /dev/ttyACM0`|the usb port where the programmer is attached| -|`-b 19200`|the baudrate| -|`-p m16u2`|the target device you want to program| -|`-vvv`|enable the verbose output| -|`-U flash:w:/home/USER/newFirmware/16u2.hex:i`|specify that you want to write (w) the .hex file inside the flash memory| +--- +title: 'Upgrading Firmware of the Arduino Due Programming Port 16U2' +difficulty: beginner +compatible-products: [due] +description: 'In this tutorial you will update the ATmega16U2 firmware using an Arduino UNO or Mega as an AVR-ISP (in-system programmer).' +author: 'Arduino' +tags: + - Firmware +hardware: + - hardware/02.hero/boards/due +software: + - ide-v1 + - web-editor +--- + +## Introduction + +Behind the Arduino Due Programming port there is an AVR microcontroller (ATmega16U2) which converts the USB signals coming from the computer to the first serial port of the SAM3X. In this tutorial you will update the ATmega16U2 firmware using an Arduino UNO or Mega as an AVR-ISP (in-system programmer). + +## Instructions + +To use your Arduino board to burn a bootloader onto an AVR, you need to follow a few simple steps. + +**1.** Open the **ArduinoISP** sketch (in **Examples**) in the Arduino IDE. + +**2.** Select the items in the **Tools > Board** and **Serial Port** menus that correspond to the board you are using as the programmer (not the board being programmed). + +**3.** Upload the ArduinoISP sketch. + +**4.** Connect a 10uF (micro Farad) capacitor between the GND and RESET pin. + +**5.** Connect the following pins from the Arduino UNO (or Mega) to the ATmega16U2 ICSP connector: + +||UNO|Mega|16U2 ICSP| +|-|-|-|-| +|SCK|13|52|3| +|MISO|12|50|1| +|MOSI|11|51|4| +|Reset|10|10|5| +|GND|GND|GND|6| +|+5V|5V|5V|2| + +![The Pins of the Due board](./assets/Due16U2UpgradeSPI.jpg) + +The Arduino Due will take power from the Arduino UNO set as AVR programmer. If you want further details on the connections between the UNO/Mega and the ICSP connector of the target please look this tutorial: [Arduino as AVR-ISP](https://www.arduino.cc/en/Tutorial/ArduinoISP). + +## Upgrade the Firmware Using Avrdude + +To upgrade the firmware you need to use a command line tool called "avrdude", that is already included inside your IDE folder. You find it at the following path: `/path_to_arduino/arduino.1.5.x/hardware/tools` + + +The firmware to upload on the 16U2 is in a binary format that has the .hex extension. + +### Linux and Mac + +First thing to do is to go to the directory that contains the avrdude tools that comes with the IDE. For doing that, open a terminal window and type: + +`cd /home/USER/arduino-1.5.2/hardware/tools` + +the path to reach the Arduino directory depends on where you placed it. Then you can execute the avrdude tool specifying all the parameters you need to flash the firmware. Here is the complete line: + + +``` +/home/USER/arduino-1.5.2/hardware/tools$ ./avrdude -C avrdude.conf -c arduino -P /dev/ttyACM0 -b 19200 -p m16u2 -vvv -U flash:w:/home/USER/newFirmware/16u2.hex:i +``` + +### Windows + +First thing to do is to go to the directory that contains the avrdude tools that comes with the IDE. For doing that open a command prompt window clicking on Start and typing `cmd` then press enter. + +Once the command prompt is open should display a row like this: `C:\Users\USER` then type the following command to move inside the Arduino folder (it depends where you placed it): `cd arduino-1.5.2\hardware\tools`. + +the path to reach the Arduino directory depends where you placed it. Then you can execute the avrdude tool specifying all the parameters you need to flash the firmware. Here is the complete line: + + +``` +arduino-1.5.2/hardware/tool> avrdude.exe -C avrdude.conf -c arduino -P /dev/ttyACM0 -b 19200 -p m16u2 -vvv -U flash:w:/home/USER/newFirmware/16u2.hex:i +``` + +### Avrdude Parameter Explanations + +| | | +|-|-| +|`-C avrdude.conf`|load the configuration file for using the Arduino UNO as programmer| +|`-c arduino`|specify the programmer you want to use| +|`-P /dev/ttyACM0`|the usb port where the programmer is attached| +|`-b 19200`|the baudrate| +|`-p m16u2`|the target device you want to program| +|`-vvv`|enable the verbose output| +|`-U flash:w:/home/USER/newFirmware/16u2.hex:i`|specify that you want to write (w) the .hex file inside the flash memory| diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/compatibility.yml b/content/hardware/10.mega/boards/giga-r1-wifi/compatibility.yml similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/compatibility.yml rename to content/hardware/10.mega/boards/giga-r1-wifi/compatibility.yml diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/datasheet/assets/GIGA_R1_WiFi_Block_Diagram.png b/content/hardware/10.mega/boards/giga-r1-wifi/datasheet/assets/GIGA_R1_WiFi_Block_Diagram.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/datasheet/assets/GIGA_R1_WiFi_Block_Diagram.png rename to content/hardware/10.mega/boards/giga-r1-wifi/datasheet/assets/GIGA_R1_WiFi_Block_Diagram.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/datasheet/assets/GIGA_R1_WiFi_Power_Tree.png b/content/hardware/10.mega/boards/giga-r1-wifi/datasheet/assets/GIGA_R1_WiFi_Power_Tree.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/datasheet/assets/GIGA_R1_WiFi_Power_Tree.png rename to content/hardware/10.mega/boards/giga-r1-wifi/datasheet/assets/GIGA_R1_WiFi_Power_Tree.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/datasheet/assets/featured.png b/content/hardware/10.mega/boards/giga-r1-wifi/datasheet/assets/featured.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/datasheet/assets/featured.png rename to content/hardware/10.mega/boards/giga-r1-wifi/datasheet/assets/featured.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/datasheet/assets/gigaMechanical.png b/content/hardware/10.mega/boards/giga-r1-wifi/datasheet/assets/gigaMechanical.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/datasheet/assets/gigaMechanical.png rename to content/hardware/10.mega/boards/giga-r1-wifi/datasheet/assets/gigaMechanical.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/datasheet/assets/gigaR1WiFiBottom.png b/content/hardware/10.mega/boards/giga-r1-wifi/datasheet/assets/gigaR1WiFiBottom.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/datasheet/assets/gigaR1WiFiBottom.png rename to content/hardware/10.mega/boards/giga-r1-wifi/datasheet/assets/gigaR1WiFiBottom.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/datasheet/assets/gigaR1WiFiTop.png b/content/hardware/10.mega/boards/giga-r1-wifi/datasheet/assets/gigaR1WiFiTop.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/datasheet/assets/gigaR1WiFiTop.png rename to content/hardware/10.mega/boards/giga-r1-wifi/datasheet/assets/gigaR1WiFiTop.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/datasheet/datasheet.md b/content/hardware/10.mega/boards/giga-r1-wifi/datasheet/datasheet.md similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/datasheet/datasheet.md rename to content/hardware/10.mega/boards/giga-r1-wifi/datasheet/datasheet.md diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/downloads/ABX00063-cad-files.zip b/content/hardware/10.mega/boards/giga-r1-wifi/downloads/ABX00063-cad-files.zip similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/downloads/ABX00063-cad-files.zip rename to content/hardware/10.mega/boards/giga-r1-wifi/downloads/ABX00063-cad-files.zip diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/downloads/ABX00063-full-pinout.pdf b/content/hardware/10.mega/boards/giga-r1-wifi/downloads/ABX00063-full-pinout.pdf similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/downloads/ABX00063-full-pinout.pdf rename to content/hardware/10.mega/boards/giga-r1-wifi/downloads/ABX00063-full-pinout.pdf diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/downloads/ABX00063-pinout.png b/content/hardware/10.mega/boards/giga-r1-wifi/downloads/ABX00063-pinout.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/downloads/ABX00063-pinout.png rename to content/hardware/10.mega/boards/giga-r1-wifi/downloads/ABX00063-pinout.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/downloads/ABX00063-schematics.pdf b/content/hardware/10.mega/boards/giga-r1-wifi/downloads/ABX00063-schematics.pdf similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/downloads/ABX00063-schematics.pdf rename to content/hardware/10.mega/boards/giga-r1-wifi/downloads/ABX00063-schematics.pdf diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/essentials.md b/content/hardware/10.mega/boards/giga-r1-wifi/essentials.md similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/essentials.md rename to content/hardware/10.mega/boards/giga-r1-wifi/essentials.md diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/features.md b/content/hardware/10.mega/boards/giga-r1-wifi/features.md similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/features.md rename to content/hardware/10.mega/boards/giga-r1-wifi/features.md diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/image.svg b/content/hardware/10.mega/boards/giga-r1-wifi/image.svg similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/image.svg rename to content/hardware/10.mega/boards/giga-r1-wifi/image.svg diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/interactive/ABX00063-pinout.png b/content/hardware/10.mega/boards/giga-r1-wifi/interactive/ABX00063-pinout.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/interactive/ABX00063-pinout.png rename to content/hardware/10.mega/boards/giga-r1-wifi/interactive/ABX00063-pinout.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/interactive/altium.zip b/content/hardware/10.mega/boards/giga-r1-wifi/interactive/altium.zip similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/interactive/altium.zip rename to content/hardware/10.mega/boards/giga-r1-wifi/interactive/altium.zip diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/product.md b/content/hardware/10.mega/boards/giga-r1-wifi/product.md similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/product.md rename to content/hardware/10.mega/boards/giga-r1-wifi/product.md diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tech-specs.md b/content/hardware/10.mega/boards/giga-r1-wifi/tech-specs.md similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tech-specs.md rename to content/hardware/10.mega/boards/giga-r1-wifi/tech-specs.md diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tech-specs.yml b/content/hardware/10.mega/boards/giga-r1-wifi/tech-specs.yml similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tech-specs.yml rename to content/hardware/10.mega/boards/giga-r1-wifi/tech-specs.yml diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/BOOT0.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/BOOT0.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/BOOT0.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/BOOT0.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/STM32H747XI.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/STM32H747XI.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/STM32H747XI.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/STM32H747XI.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/audio-jack.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/audio-jack.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/audio-jack.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/audio-jack.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/canpins.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/canpins.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/canpins.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/canpins.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/i2cpins.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/i2cpins.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/i2cpins.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/i2cpins.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/jtag.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/jtag.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/jtag.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/jtag.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/red_led_blink.gif b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/red_led_blink.gif similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/red_led_blink.gif rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/red_led_blink.gif diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/rtc.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/rtc.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/rtc.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/rtc.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/schematics-spi.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/schematics-spi.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/schematics-spi.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/schematics-spi.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/spipins.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/spipins.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/spipins.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/spipins.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/usb.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/usb.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/usb.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/usb.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/wifi.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/wifi.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/wifi.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/assets/wifi.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/cheat-sheet.md b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/cheat-sheet.md similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/cheat-sheet.md rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/cheat-sheet.md diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/hero-banner.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/hero-banner.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/hero-banner.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/cheat-sheet/hero-banner.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-audio/assets/adcs.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-audio/assets/adcs.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-audio/assets/adcs.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-audio/assets/adcs.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-audio/assets/audio-pins.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-audio/assets/audio-pins.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-audio/assets/audio-pins.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-audio/assets/audio-pins.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-audio/assets/dacs-and-jack.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-audio/assets/dacs-and-jack.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-audio/assets/dacs-and-jack.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-audio/assets/dacs-and-jack.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-audio/assets/jack-schematic-1.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-audio/assets/jack-schematic-1.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-audio/assets/jack-schematic-1.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-audio/assets/jack-schematic-1.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-audio/assets/jack-schematic-2.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-audio/assets/jack-schematic-2.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-audio/assets/jack-schematic-2.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-audio/assets/jack-schematic-2.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-audio/assets/jack-schematic-3.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-audio/assets/jack-schematic-3.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-audio/assets/jack-schematic-3.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-audio/assets/jack-schematic-3.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-audio/content.md b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-audio/content.md similarity index 97% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-audio/content.md rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-audio/content.md index 058937af88..c35d0cac4e 100644 --- a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-audio/content.md +++ b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-audio/content.md @@ -1,916 +1,916 @@ ---- -title: Guide to GIGA R1 Advanced ADC/DAC and Audio Features -description: 'Learn how to use the ADC/DAC features, along with useful examples on how to generate waveforms and play audio from a file.' -author: José Bagur, Taddy Chung & Karl Söderby -tags: [ADC, DAC, Audio, USB] ---- - -In the GIGA R1, you can find the powerful STM32H747XI, a dual-core 32-bit Arm® Cortex® microcontroller from STMicroelectronics; this is the same microcontroller found in the [Portenta H7](/hardware/portenta-h7) board. - -In this guide, we will focus on the advanced ADC/DAC features, utilizing the [Arduino_AdvancedAnalog](https://github.com/arduino-libraries/Arduino_AdvancedAnalog) library. The examples found in this guide can be used to: -- Set up and read ADCs with specific parameters (resolution, sample rate, number of samples per channel, queue depth). -- Set up and write to a DAC channel with specific parameters (resolution, frequency, number of samples per channel, queue depth). -- Generate specific waveforms through input via serial commands (triangle, square, sine, sawtooth waves) as well as adjusting the frequency. -- Read and play audio files (`.wav`) from a USB stick (connected to USB-A) to a speaker, using the audio jack. - -***Important note: the GIGA R1 does NOT have an amplifying circuit onboard. Connecting speakers that does not have an amplifier can damage the DAC and the board itself.*** - -## Hardware & Software Needed - -- [GIGA R1 WiFi](/hardware/giga-r1). -- [Arduino IDE](https://www.arduino.cc/en/software) -- [Arduino_AdvancedAnalog](https://github.com/arduino-libraries/Arduino_AdvancedAnalog) library. - -And for specific examples: - -- USB Mass Storage Device (USB Stick). -- Auxiliary Cable. -- Speaker with a built-in amplifier. - -## ADC/DAC Pins and Connectors - -The GIGA gives you access to more pins than any other Arduino board accessible for makers. Many have unique features; we will focus on the pins that have audio features or can be used for developing audio applications. Audio pins and connectors in the GIGA can be divided into three important groups: - -- Analog-to-Digital Converters (ADC) pins -- Digital-to-Analog Converters (DAC) pins -- Tip, Ring, Ring, Sleeve (TRRS) 3.5mm jack - -The image below shows the position of the audio pins and connectors of the GIGA R1: - -![ADC/DAC pins and connectors of the GIGA R1](assets/audio-pins.png) - -The table below explains the full functionality of the listed on it; notice that some pins have more than one functionality, such as `DAC0`, `DAC1`, `CANRX`, and `CANTX`: - -| Pin | Functionality | -|:-----:|:--------------:| -| A0 | ADC | -| A1 | ADC | -| A2 | ADC | -| A3 | ADC | -| A4 | ADC | -| A5 | ADC | -| A6 | ADC | -| A7 | ADC | -| A8 | ADC | -| A9 | ADC | -| A10 | ADC | -| A11 | ADC | -| DAC0 | ADC and DAC | -| DAC1 | ADC and DAC | -| CANRX | ADC and CAN RX | -| CANTX | ADC and CAN TX | - -Pins `A7`, `DAC0`, and `DAC1` can also be accessed via the built-in TRRS 3.5mm jack. `DAC0` is connected to ring 1 (right channel), `DAC1` is connected to the tip (left channel), and `A7` is connected to ring 2 (microphone) of the jack, as shown in the schematic below: - -![GIGA R1 TRRS 3.5mm jack schematic](assets/jack-schematic-1.png) - -## Analog-to-Digital Converter (ADC) - -An analog-to-digital converter (ADC) is a device that converts an analog voltage, or signal, into digital data. The GIGA R1 microcontroller, the STM32H747XI, embeds three ADCs whose resolution can be configured to 8, 10, 12, 14, or 16 bits. Each ADC shares up to 20 external channels that can be accessed in the GIGA R1 board through pins `A0`, `A1`, `A2`, `A3`, `A4`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, and `A11`; pins `DAC0`, `DAC1`, `CANRX`, and `CANTX` can also be used as ADCs. - -![ADC pins of the GIGA R1](assets/adcs.png) - -`A7` is connected to ring 2 (microphone) of the jack, as shown in the schematic below: - -![GIGA R1 3.5mm input jack schematic](assets/jack-schematic-2.png) - -The GIGA R1 ADCs can be used with the [built-in analog input/output functions of the Arduino programming language](https://www.arduino.cc/reference/de/language/functions/analog-io/analogread/), though they only provide the basic functionalities of the ADCs. To use all of the capabilities of the DACs from the GIGA R1, we can use the [Arduino_AdvancedAnalog](https://github.com/bcmi-labs/Arduino_AdvancedAnalog) library from Arduino. Let's check some interesting examples that show some capabilities of the GIGA R1 ADCs! - -### Multi Channel ADC - -The following example code show how to use two GIGA R1 ADCs simultaneously with the **Arduino_AdvancedAnalog** library from Arduino: - -```arduino -// This example shows how to use 2 ADC simultaneously. -#include - -AdvancedADC adc1(A0); -AdvancedADC adc2(A1); -uint64_t last_millis = 0; - -void setup() { - Serial.begin(9600); - - // Resolution, sample rate, number of samples per channel, queue depth. - if (!adc1.begin(AN_RESOLUTION_16, 16000, 32, 64)) { - Serial.println("Failed to start analog acquisition!"); - while (1); - } - - if (!adc2.begin(AN_RESOLUTION_16, 8000, 32, 64)) { - Serial.println("Failed to start analog acquisition!"); - while (1); - } -} - -void adc_print_buf(AdvancedADC &adc) { - if (adc.available()) { - SampleBuffer buf = adc.read(); - - // Print first sample. - Serial.println(buf[0]); - - // Release the buffer to return it to the pool. - buf.release(); - } -} - -void loop() { - if (millis() - last_millis > 1) { - adc_print_buf(adc1); - adc_print_buf(adc2); - last_millis = millis(); - } -} -``` - -### ADC Serial Plotter Example - -The following example code shows how to use two GIGA R1 ADCs simultaneously with the **Arduino_AdvancedAnalog** library from Arduino and displays the readings via the Serial Plotter of the Arduino IDE: - -```arduino -#include - -AdvancedADC adc(A0, A1); -uint64_t last_millis = 0; - -void setup() { - Serial.begin(9600); - - // Resolution, sample rate, number of samples per channel, queue depth. - if (!adc.begin(AN_RESOLUTION_16, 16000, 32, 128)) { - Serial.println("Failed to start analog acquisition!"); - while (1); - } -} - -void loop() { - if (adc.available()) { - SampleBuffer buf = adc.read(); - // Process the buffer. - if ((millis() - last_millis) > 20) { - Serial.println(buf[0]); // Sample from first channel - Serial.println(buf[1]); // Sample from second channel - last_millis = millis(); - } - // Release the buffer to return it to the pool. - buf.release(); - } -} -``` - -## Digital-to-Analog Converters (DAC) - -A digital-to-analog converter (DAC) is a device that has a function opposite to that of the analog-to-digital converter (ADC); a DAC converts digital data to an analog voltage. The GIGA R1 microcontroller, the STM32H747XI, features two 12-bit buffered DAC channels that can convert two digital signals into two analog voltage signals. Some of the features of the DACs found in the GIGA R1 are the following: - -- 8-bit or 12-bit monotonic output -- Left or right data alignment in 12-bit mode -- Dual DAC channel independent or simultaneous conversions -- DMA capability for each channel -- External triggers for conversion -- Input voltage reference or internal voltage reference -- Analog waveform generation - -The GIGA R1 DACs are named `DAC0` and `DAC1`; they can be found on pins `A12` and `A13` correspondingly, as shown in the image below: - -![DAC0, DAC1 and the 3.5mm input jack of the GIGA R1](assets/dacs-and-jack.png) - -Besides pins `A12` and `A13`, `DAC0` and `DAC1` can also be accessed via the built-in TRRS 3.5mm jack. `DAC0` is connected to the right channel (tip), while `DAC1` is connected to the left channel (ring) of the input jack as shown in the schematic below: - -![GIGA R1 3.5mm input jack schematic](assets/jack-schematic-3.png) - -### Waveform Generation with the GIGA R1 DACs - -Waveform generation is an exciting application used in audio systems, for example, synthesizers, for audio signal generation. - -The following example shows how to output an 8kHz square wave on `DAC0`: - -```arduino -// This example outputs an 8KHz square wave on A12/DAC0. -#include - -AdvancedDAC dac1(A12); - -void setup() { - Serial.begin(9600); - - while (!Serial) { - - } - - if (!dac1.begin(AN_RESOLUTION_12, 8000, 32, 64)) { - Serial.println("Failed to start DAC1 !"); - while (1); - } -} - -void dac_output_sq(AdvancedDAC &dac_out) { - if (dac_out.available()) { - - // Get a free buffer for writing. - SampleBuffer buf = dac_out.dequeue(); - - // Write data to buffer. - for (int i=0; i - -AdvancedDAC dac1(A12); -AdvancedDAC dac2(A13); - -void setup() { - Serial.begin(9600); - - while (!Serial) { - - } - - if (!dac1.begin(AN_RESOLUTION_12, 8000, 32, 64)) { - Serial.println("Failed to start DAC1 !"); - while (1); - } - - if (!dac2.begin(AN_RESOLUTION_12, 16000, 32, 64)) { - Serial.println("Failed to start DAC2 !"); - while (1); - } -} - -void dac_output_sq(AdvancedDAC &dac_out) { - if (dac_out.available()) { - - // Get a free buffer for writing. - SampleBuffer buf = dac_out.dequeue(); - - // Write data to buffer. - for (int i=0; i - -AdvancedDAC dac1(A12); - -uint16_t lut[] = { - 0x0800,0x08c8,0x098f,0x0a52,0x0b0f,0x0bc5,0x0c71,0x0d12,0x0da7,0x0e2e,0x0ea6,0x0f0d,0x0f63,0x0fa7,0x0fd8,0x0ff5, - 0x0fff,0x0ff5,0x0fd8,0x0fa7,0x0f63,0x0f0d,0x0ea6,0x0e2e,0x0da7,0x0d12,0x0c71,0x0bc5,0x0b0f,0x0a52,0x098f,0x08c8, - 0x0800,0x0737,0x0670,0x05ad,0x04f0,0x043a,0x038e,0x02ed,0x0258,0x01d1,0x0159,0x00f2,0x009c,0x0058,0x0027,0x000a, - 0x0000,0x000a,0x0027,0x0058,0x009c,0x00f2,0x0159,0x01d1,0x0258,0x02ed,0x038e,0x043a,0x04f0,0x05ad,0x0670,0x0737 -}; - -static size_t lut_size = sizeof(lut) / sizeof(lut[0]); - -void setup() { - Serial.begin(9600); - if (!dac1.begin(AN_RESOLUTION_12, 32000 * lut_size, 64, 128)) { - Serial.println("Failed to start DAC1 !"); - while (1); - } -} - -void loop() { - static size_t lut_offs = 0; - - if (dac1.available()) { - // Get a free buffer for writing. - SampleBuffer buf = dac1.dequeue(); - - // Write data to buffer. - for (size_t i=0; i - -#define N_SAMPLES (256) -#define DEFAULT_FREQUENCY (16000) - -AdvancedDAC dac1(A12); -uint8_t SAMPLES_BUFFER[N_SAMPLES]; -size_t dac_frequency = DEFAULT_FREQUENCY; - -void generate_waveform(int cmd) -{ - switch (cmd) { - case 't': - // Triangle wave - Serial.print("Waveform: Triangle "); - for (int i=0; i 1000) { - dac_frequency /= 2; - } else { - break; - } - - dac1.stop(); - delay(500); - if (!dac1.begin(AN_RESOLUTION_8, dac_frequency * N_SAMPLES, N_SAMPLES, 32)) { - Serial.println("Failed to start DAC1 !"); - } - delay(500); - break; - - default: - Serial.print("Unknown command "); - Serial.println((char) cmd); - return; - } - - Serial.print(dac_frequency/1000); - Serial.println("KHz"); -} - -void setup() { - Serial.begin(115200); - - while (!Serial) { - - } - - - Serial.println("Enter a command:"); - Serial.println("t: Triangle wave"); - Serial.println("q: Square wave"); - Serial.println("s: Sine wave"); - Serial.println("r: Sawtooth wave"); - Serial.println("+: Increase frequency"); - Serial.println("-: Decrease frequency"); - - generate_waveform('s'); - - // DAC initialization - if (!dac1.begin(AN_RESOLUTION_8, DEFAULT_FREQUENCY * N_SAMPLES, N_SAMPLES, 32)) { - Serial.println("Failed to start DAC1 !"); - while (1); - } -} - -void loop() { - if (Serial.available() > 0) { - int cmd = Serial.read(); - if (cmd != '\n') { - generate_waveform(cmd); - } - } - - if (dac1.available()) { - // Get a free buffer for writing. - SampleBuffer buf = dac1.dequeue(); - - // Write data to buffer. - for (size_t i=0; i -#include -#include -#include - -AdvancedDAC dac1(A12); - -USBHostMSD msd; -mbed::FATFileSystem usb("USB_DRIVE"); - -FILE * file = nullptr; -int sample_size = 0; -int samples_count = 0; - - -void setup() -{ - Serial.begin(115200); - while (!Serial); - - /* Enable power for HOST USB connector. */ - pinMode(PA_15, OUTPUT); - digitalWrite(PA_15, HIGH); - - Serial.println("Please connect a USB stick to the GIGA's USB port ..."); - while (!msd.connect()) delay(100); - - Serial.println("Mounting USB device ..."); - int const rc_mount = usb.mount(&msd); - if (rc_mount) - { - Serial.print("Error mounting USB device "); - Serial.println(rc_mount); - return; - } - - Serial.println("Opening audio file ..."); - - /* 16-bit PCM Mono 16kHz realigned noise reduction */ - file = fopen("/USB_DRIVE/AUDIO_SAMPLE.wav", "rb"); - if (file == nullptr) - { - Serial.print("Error opening audio file: "); - Serial.println(strerror(errno)); - return; - } - - Serial.println("Reading audio header ..."); - struct wav_header_t - { - char chunkID[4]; //"RIFF" = 0x46464952 - unsigned long chunkSize; //28 [+ sizeof(wExtraFormatBytes) + wExtraFormatBytes] + sum(sizeof(chunk.id) + sizeof(chunk.size) + chunk.size) - char format[4]; //"WAVE" = 0x45564157 - char subchunk1ID[4]; //"fmt " = 0x20746D66 - unsigned long subchunk1Size; //16 [+ sizeof(wExtraFormatBytes) + wExtraFormatBytes] - unsigned short audioFormat; - unsigned short numChannels; - unsigned long sampleRate; - unsigned long byteRate; - unsigned short blockAlign; - unsigned short bitsPerSample; - }; - - wav_header_t header; - fread(&header, sizeof(header), 1, file); - - Serial.println("WAV File Header read:"); - char msg[64] = {0}; - snprintf(msg, sizeof(msg), "File Type: %s", header.chunkID); - Serial.println(msg); - snprintf(msg, sizeof(msg), "File Size: %ld", header.chunkSize); - Serial.println(msg); - snprintf(msg, sizeof(msg), "WAV Marker: %s", header.format); - Serial.println(msg); - snprintf(msg, sizeof(msg), "Format Name: %s", header.subchunk1ID); - Serial.println(msg); - snprintf(msg, sizeof(msg), "Format Length: %ld", header.subchunk1Size); - Serial.println(msg); - snprintf(msg, sizeof(msg), "Format Type: %hd", header.audioFormat); - Serial.println(msg); - snprintf(msg, sizeof(msg), "Number of Channels: %hd", header.numChannels); - Serial.println(msg); - snprintf(msg, sizeof(msg), "Sample Rate: %ld", header.sampleRate); - Serial.println(msg); - snprintf(msg, sizeof(msg), "Sample Rate * Bits/Sample * Channels / 8: %ld", header.byteRate); - Serial.println(msg); - snprintf(msg, sizeof(msg), "Bits per Sample * Channels / 8: %hd", header.blockAlign); - Serial.println(msg); - snprintf(msg, sizeof(msg), "Bits per Sample: %hd", header.bitsPerSample); - Serial.println(msg); - - /* Find the data section of the WAV file. */ - struct chunk_t - { - char ID[4]; - unsigned long size; - }; - - chunk_t chunk; - snprintf(msg, sizeof(msg), "id\t" "size"); - Serial.println(msg); - /* Find data chunk. */ - while (true) - { - fread(&chunk, sizeof(chunk), 1, file); - snprintf(msg, sizeof(msg), "%c%c%c%c\t" "%li", chunk.ID[0], chunk.ID[1], chunk.ID[2], chunk.ID[3], chunk.size); - Serial.println(msg); - if (*(unsigned int *) &chunk.ID == 0x61746164) - break; - /* Skip chunk data bytes. */ - fseek(file, chunk.size, SEEK_CUR); - } - - /* Determine number of samples. */ - sample_size = header.bitsPerSample / 8; - samples_count = chunk.size * 8 / header.bitsPerSample; - snprintf(msg, sizeof(msg), "Sample size = %i", sample_size); Serial.println(msg); - snprintf(msg, sizeof(msg), "Samples count = %i", samples_count); Serial.println(msg); - - /* Configure the advanced DAC. */ - if (!dac1.begin(AN_RESOLUTION_12, header.sampleRate, 256, 16)) - { - Serial.println("Failed to start DAC1 !"); - return; - } -} - -void loop() -{ - if (dac1.available() && !feof(file)) - { - /* Read data from file. */ - uint16_t sample_data[256] = {0}; - fread(sample_data, sample_size, 256, file); - - /* Get a free buffer for writing. */ - SampleBuffer buf = dac1.dequeue(); - - /* Write data to buffer. */ - for (size_t i = 0; i < buf.size(); i++) - { - /* Scale down to 12 bit. */ - uint16_t const dac_val = ((static_cast(sample_data[i])+32768)>>4) & 0x0fff; - buf[i] = dac_val; - } - - /* Write the buffer to DAC. */ - dac1.write(buf); - } -} -``` - -### Loop Multiple Audio Files - -This example is similar to the **Play Single Audio File** example, but with some key changes: - -- This example uses multiple audio files. -- The file read is moved to a separate function, `configFile()`, as it will be continuously called from the sketch. -- Instead of playing a file once, it keeps looping it. -- The **BOOT0** (`PC_13`) button (right next to the audio jack) is used as a regular pushbutton to loop through the audio files. -- Pressing the button changes the file played. - -The files used are called `DRUM.wav`, `WARP.wav`, `BASS.wav` and `SHAKE.wav`. They are very short (around 1 second). These needs to be present on the USB stick used. - -You can download them from [this link](/resources/misc/giga_audio_examples.zip). - -```arduino -/* - * GIGA R1 - Audio Playback - * Simple wav format audio playback via 12-Bit DAC output by reading from a USB drive. - * In order for this sketch to work you need to rename 'USB_DRIVE' to the name of your USB stick drive. - * Furthermore you need to store the provided audio file AUDIO_SAMPLE.wav on it. -*/ - -#include -#include -#include -#include - -AdvancedDAC dac1(A12); - -USBHostMSD msd; -mbed::FATFileSystem usb("usb"); - -FILE *file = nullptr; -int sample_size = 0; -int samples_count = 0; - -int swapFile; - -void setup() { - Serial.begin(115200); - while (!Serial) - ; - - /* Enable power for HOST USB connector. */ - - pinMode(PA_15, OUTPUT); - digitalWrite(PA_15, HIGH); - - Serial.println("Please connect a USB stick to the GIGA's USB port ..."); - while (!msd.connect()) delay(100); - - Serial.println("Mounting USB device ..."); - int const rc_mount = usb.mount(&msd); - if (rc_mount) { - Serial.print("Error mounting USB device "); - Serial.println(rc_mount); - return; - } - configFile(); -} - -void loop() { - if (dac1.available() && !feof(file)) { - /* Read data from file. */ - uint16_t sample_data[256] = { 0 }; - fread(sample_data, sample_size, 256, file); - - /* Get a free buffer for writing. */ - SampleBuffer buf = dac1.dequeue(); - - /* Write data to buffer. */ - for (size_t i = 0; i < buf.size(); i++) { - /* Scale down to 12 bit. */ - uint16_t const dac_val = ((static_cast(sample_data[i]) + 32768) >> 4) & 0x0fff; - buf[i] = dac_val; - } - - /* Write the buffer to DAC. */ - dac1.write(buf); - - if(feof(file)){ - fclose(file); - configFile(); - } - } - - int buttonState = digitalRead(PC_13); - - if (buttonState == 1) { - swapFile = swapFile + 1; - if (swapFile == 4) { - swapFile = 0; - } - delay(500); - configFile(); - } -} - - -void configFile() { - Serial.println("Opening audio file ..."); - - /* 16-bit PCM Mono 16kHz realigned noise reduction */ - if (swapFile == 0) { - file = fopen("/usb/DRUM.wav", "rb"); - } else if (swapFile == 1) { - file = fopen("/usb/WARP.wav", "rb"); - } else if (swapFile == 2) { - file = fopen("/usb/BASS.wav", "rb"); - } else if (swapFile == 3) { - file = fopen("/usb/SHAKE.wav", "rb"); - } - - if (file == nullptr) { - Serial.print("Error opening audio file: "); - Serial.println(strerror(errno)); - return; - } - - Serial.println("Reading audio header ..."); - struct wav_header_t { - char chunkID[4]; //"RIFF" = 0x46464952 - unsigned long chunkSize; //28 [+ sizeof(wExtraFormatBytes) + wExtraFormatBytes] + sum(sizeof(chunk.id) + sizeof(chunk.size) + chunk.size) - char format[4]; //"WAVE" = 0x45564157 - char subchunk1ID[4]; //"fmt " = 0x20746D66 - unsigned long subchunk1Size; //16 [+ sizeof(wExtraFormatBytes) + wExtraFormatBytes] - unsigned short audioFormat; - unsigned short numChannels; - unsigned long sampleRate; - unsigned long byteRate; - unsigned short blockAlign; - unsigned short bitsPerSample; - }; - - wav_header_t header; - fread(&header, sizeof(header), 1, file); - - Serial.println("WAV File Header read:"); - char msg[64] = { 0 }; - snprintf(msg, sizeof(msg), "File Type: %s", header.chunkID); - Serial.println(msg); - snprintf(msg, sizeof(msg), "File Size: %ld", header.chunkSize); - Serial.println(msg); - snprintf(msg, sizeof(msg), "WAV Marker: %s", header.format); - Serial.println(msg); - snprintf(msg, sizeof(msg), "Format Name: %s", header.subchunk1ID); - Serial.println(msg); - snprintf(msg, sizeof(msg), "Format Length: %ld", header.subchunk1Size); - Serial.println(msg); - snprintf(msg, sizeof(msg), "Format Type: %hd", header.audioFormat); - Serial.println(msg); - snprintf(msg, sizeof(msg), "Number of Channels: %hd", header.numChannels); - Serial.println(msg); - snprintf(msg, sizeof(msg), "Sample Rate: %ld", header.sampleRate); - Serial.println(msg); - snprintf(msg, sizeof(msg), "Sample Rate * Bits/Sample * Channels / 8: %ld", header.byteRate); - Serial.println(msg); - snprintf(msg, sizeof(msg), "Bits per Sample * Channels / 8: %hd", header.blockAlign); - Serial.println(msg); - snprintf(msg, sizeof(msg), "Bits per Sample: %hd", header.bitsPerSample); - Serial.println(msg); - - /* Find the data section of the WAV file. */ - struct chunk_t { - char ID[4]; - unsigned long size; - }; - - chunk_t chunk; - snprintf(msg, sizeof(msg), "id\t" - "size"); - Serial.println(msg); - /* Find data chunk. */ - while (true) { - fread(&chunk, sizeof(chunk), 1, file); - snprintf(msg, sizeof(msg), "%c%c%c%c\t" - "%li", - chunk.ID[0], chunk.ID[1], chunk.ID[2], chunk.ID[3], chunk.size); - Serial.println(msg); - if (*(unsigned int *)&chunk.ID == 0x61746164) - break; - /* Skip chunk data bytes. */ - fseek(file, chunk.size, SEEK_CUR); - } - - /* Determine number of samples. */ - sample_size = header.bitsPerSample / 8; - samples_count = chunk.size * 8 / header.bitsPerSample; - snprintf(msg, sizeof(msg), "Sample size = %i", sample_size); - Serial.println(msg); - snprintf(msg, sizeof(msg), "Samples count = %i", samples_count); - Serial.println(msg); - - /* Configure the advanced DAC. */ - if (!dac1.begin(AN_RESOLUTION_12, header.sampleRate, 256, 16)) { - Serial.println("Failed to start DAC1 !"); - return; - } -} -``` - -## Pulse Density Modulation Support - -Pulse Density Support (PDM) is a form of modulation used to represent analog information into digital information; PDM uses a high-frequency stream of 1-bit digital samples. In PDM, a large cluster of ones represents a positive amplitude, while a large cluster of zeros represents a negative amplitude. - -The GIGA R1 PDM support can be used with the [built-in PDM library](https://docs.arduino.cc/learn/built-in-libraries/pdm). Let's check an interesting example that shows of how to read a PDM microphone wwith the GIGA R1: - -```arduino -#include - -// Default number of output channels -static const char channels = 1; - -// Default PCM output frequency -static const int frequency = 16000; - -// Buffer to read samples into, each sample is 16-bits -short sampleBuffer[128]; - -// Number of audio samples read -volatile int samplesRead; - -void setup() { - Serial.begin(9600); - while (!Serial); - - // Configure the callback function and gain - PDM.onReceive(onPDMdata); - PDM.setGain(30); - - // Initialize PDM microphone in mono mode, and a 16 kHz sample rate: - if (!PDM.begin(channels, frequency)) { - Serial.println("Failed to start PDM!"); - while (1); - } -} - -void loop() { - // Wait for samples to be read - if (samplesRead) { - - // Print samples to the Serial Monitor - for (int i = 0; i < samplesRead; i++) { - if(channels == 2) { - Serial.print("L:"); - Serial.print(sampleBuffer[i]); - Serial.print(" R:"); - i++; - } - Serial.println(sampleBuffer[i]); - } - - samplesRead = 0; - } -} - -// Callback function -void onPDMdata() { - int bytesAvailable = PDM.available(); - PDM.read(sampleBuffer, bytesAvailable); - samplesRead = bytesAvailable / 2; -} +--- +title: Guide to GIGA R1 Advanced ADC/DAC and Audio Features +description: 'Learn how to use the ADC/DAC features, along with useful examples on how to generate waveforms and play audio from a file.' +author: José Bagur, Taddy Chung & Karl Söderby +tags: [ADC, DAC, Audio, USB] +--- + +In the GIGA R1, you can find the powerful STM32H747XI, a dual-core 32-bit Arm® Cortex® microcontroller from STMicroelectronics; this is the same microcontroller found in the [Portenta H7](/hardware/portenta-h7) board. + +In this guide, we will focus on the advanced ADC/DAC features, utilizing the [Arduino_AdvancedAnalog](https://github.com/arduino-libraries/Arduino_AdvancedAnalog) library. The examples found in this guide can be used to: +- Set up and read ADCs with specific parameters (resolution, sample rate, number of samples per channel, queue depth). +- Set up and write to a DAC channel with specific parameters (resolution, frequency, number of samples per channel, queue depth). +- Generate specific waveforms through input via serial commands (triangle, square, sine, sawtooth waves) as well as adjusting the frequency. +- Read and play audio files (`.wav`) from a USB stick (connected to USB-A) to a speaker, using the audio jack. + +***Important note: the GIGA R1 does NOT have an amplifying circuit onboard. Connecting speakers that does not have an amplifier can damage the DAC and the board itself.*** + +## Hardware & Software Needed + +- [GIGA R1 WiFi](/hardware/giga-r1). +- [Arduino IDE](https://www.arduino.cc/en/software) +- [Arduino_AdvancedAnalog](https://github.com/arduino-libraries/Arduino_AdvancedAnalog) library. + +And for specific examples: + +- USB Mass Storage Device (USB Stick). +- Auxiliary Cable. +- Speaker with a built-in amplifier. + +## ADC/DAC Pins and Connectors + +The GIGA gives you access to more pins than any other Arduino board accessible for makers. Many have unique features; we will focus on the pins that have audio features or can be used for developing audio applications. Audio pins and connectors in the GIGA can be divided into three important groups: + +- Analog-to-Digital Converters (ADC) pins +- Digital-to-Analog Converters (DAC) pins +- Tip, Ring, Ring, Sleeve (TRRS) 3.5mm jack + +The image below shows the position of the audio pins and connectors of the GIGA R1: + +![ADC/DAC pins and connectors of the GIGA R1](assets/audio-pins.png) + +The table below explains the full functionality of the listed on it; notice that some pins have more than one functionality, such as `DAC0`, `DAC1`, `CANRX`, and `CANTX`: + +| Pin | Functionality | +|:-----:|:--------------:| +| A0 | ADC | +| A1 | ADC | +| A2 | ADC | +| A3 | ADC | +| A4 | ADC | +| A5 | ADC | +| A6 | ADC | +| A7 | ADC | +| A8 | ADC | +| A9 | ADC | +| A10 | ADC | +| A11 | ADC | +| DAC0 | ADC and DAC | +| DAC1 | ADC and DAC | +| CANRX | ADC and CAN RX | +| CANTX | ADC and CAN TX | + +Pins `A7`, `DAC0`, and `DAC1` can also be accessed via the built-in TRRS 3.5mm jack. `DAC0` is connected to ring 1 (right channel), `DAC1` is connected to the tip (left channel), and `A7` is connected to ring 2 (microphone) of the jack, as shown in the schematic below: + +![GIGA R1 TRRS 3.5mm jack schematic](assets/jack-schematic-1.png) + +## Analog-to-Digital Converter (ADC) + +An analog-to-digital converter (ADC) is a device that converts an analog voltage, or signal, into digital data. The GIGA R1 microcontroller, the STM32H747XI, embeds three ADCs whose resolution can be configured to 8, 10, 12, 14, or 16 bits. Each ADC shares up to 20 external channels that can be accessed in the GIGA R1 board through pins `A0`, `A1`, `A2`, `A3`, `A4`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, and `A11`; pins `DAC0`, `DAC1`, `CANRX`, and `CANTX` can also be used as ADCs. + +![ADC pins of the GIGA R1](assets/adcs.png) + +`A7` is connected to ring 2 (microphone) of the jack, as shown in the schematic below: + +![GIGA R1 3.5mm input jack schematic](assets/jack-schematic-2.png) + +The GIGA R1 ADCs can be used with the [built-in analog input/output functions of the Arduino programming language](https://www.arduino.cc/reference/de/language/functions/analog-io/analogread/), though they only provide the basic functionalities of the ADCs. To use all of the capabilities of the DACs from the GIGA R1, we can use the [Arduino_AdvancedAnalog](https://github.com/bcmi-labs/Arduino_AdvancedAnalog) library from Arduino. Let's check some interesting examples that show some capabilities of the GIGA R1 ADCs! + +### Multi Channel ADC + +The following example code show how to use two GIGA R1 ADCs simultaneously with the **Arduino_AdvancedAnalog** library from Arduino: + +```arduino +// This example shows how to use 2 ADC simultaneously. +#include + +AdvancedADC adc1(A0); +AdvancedADC adc2(A1); +uint64_t last_millis = 0; + +void setup() { + Serial.begin(9600); + + // Resolution, sample rate, number of samples per channel, queue depth. + if (!adc1.begin(AN_RESOLUTION_16, 16000, 32, 64)) { + Serial.println("Failed to start analog acquisition!"); + while (1); + } + + if (!adc2.begin(AN_RESOLUTION_16, 8000, 32, 64)) { + Serial.println("Failed to start analog acquisition!"); + while (1); + } +} + +void adc_print_buf(AdvancedADC &adc) { + if (adc.available()) { + SampleBuffer buf = adc.read(); + + // Print first sample. + Serial.println(buf[0]); + + // Release the buffer to return it to the pool. + buf.release(); + } +} + +void loop() { + if (millis() - last_millis > 1) { + adc_print_buf(adc1); + adc_print_buf(adc2); + last_millis = millis(); + } +} +``` + +### ADC Serial Plotter Example + +The following example code shows how to use two GIGA R1 ADCs simultaneously with the **Arduino_AdvancedAnalog** library from Arduino and displays the readings via the Serial Plotter of the Arduino IDE: + +```arduino +#include + +AdvancedADC adc(A0, A1); +uint64_t last_millis = 0; + +void setup() { + Serial.begin(9600); + + // Resolution, sample rate, number of samples per channel, queue depth. + if (!adc.begin(AN_RESOLUTION_16, 16000, 32, 128)) { + Serial.println("Failed to start analog acquisition!"); + while (1); + } +} + +void loop() { + if (adc.available()) { + SampleBuffer buf = adc.read(); + // Process the buffer. + if ((millis() - last_millis) > 20) { + Serial.println(buf[0]); // Sample from first channel + Serial.println(buf[1]); // Sample from second channel + last_millis = millis(); + } + // Release the buffer to return it to the pool. + buf.release(); + } +} +``` + +## Digital-to-Analog Converters (DAC) + +A digital-to-analog converter (DAC) is a device that has a function opposite to that of the analog-to-digital converter (ADC); a DAC converts digital data to an analog voltage. The GIGA R1 microcontroller, the STM32H747XI, features two 12-bit buffered DAC channels that can convert two digital signals into two analog voltage signals. Some of the features of the DACs found in the GIGA R1 are the following: + +- 8-bit or 12-bit monotonic output +- Left or right data alignment in 12-bit mode +- Dual DAC channel independent or simultaneous conversions +- DMA capability for each channel +- External triggers for conversion +- Input voltage reference or internal voltage reference +- Analog waveform generation + +The GIGA R1 DACs are named `DAC0` and `DAC1`; they can be found on pins `A12` and `A13` correspondingly, as shown in the image below: + +![DAC0, DAC1 and the 3.5mm input jack of the GIGA R1](assets/dacs-and-jack.png) + +Besides pins `A12` and `A13`, `DAC0` and `DAC1` can also be accessed via the built-in TRRS 3.5mm jack. `DAC0` is connected to the right channel (tip), while `DAC1` is connected to the left channel (ring) of the input jack as shown in the schematic below: + +![GIGA R1 3.5mm input jack schematic](assets/jack-schematic-3.png) + +### Waveform Generation with the GIGA R1 DACs + +Waveform generation is an exciting application used in audio systems, for example, synthesizers, for audio signal generation. + +The following example shows how to output an 8kHz square wave on `DAC0`: + +```arduino +// This example outputs an 8KHz square wave on A12/DAC0. +#include + +AdvancedDAC dac1(A12); + +void setup() { + Serial.begin(9600); + + while (!Serial) { + + } + + if (!dac1.begin(AN_RESOLUTION_12, 8000, 32, 64)) { + Serial.println("Failed to start DAC1 !"); + while (1); + } +} + +void dac_output_sq(AdvancedDAC &dac_out) { + if (dac_out.available()) { + + // Get a free buffer for writing. + SampleBuffer buf = dac_out.dequeue(); + + // Write data to buffer. + for (int i=0; i + +AdvancedDAC dac1(A12); +AdvancedDAC dac2(A13); + +void setup() { + Serial.begin(9600); + + while (!Serial) { + + } + + if (!dac1.begin(AN_RESOLUTION_12, 8000, 32, 64)) { + Serial.println("Failed to start DAC1 !"); + while (1); + } + + if (!dac2.begin(AN_RESOLUTION_12, 16000, 32, 64)) { + Serial.println("Failed to start DAC2 !"); + while (1); + } +} + +void dac_output_sq(AdvancedDAC &dac_out) { + if (dac_out.available()) { + + // Get a free buffer for writing. + SampleBuffer buf = dac_out.dequeue(); + + // Write data to buffer. + for (int i=0; i + +AdvancedDAC dac1(A12); + +uint16_t lut[] = { + 0x0800,0x08c8,0x098f,0x0a52,0x0b0f,0x0bc5,0x0c71,0x0d12,0x0da7,0x0e2e,0x0ea6,0x0f0d,0x0f63,0x0fa7,0x0fd8,0x0ff5, + 0x0fff,0x0ff5,0x0fd8,0x0fa7,0x0f63,0x0f0d,0x0ea6,0x0e2e,0x0da7,0x0d12,0x0c71,0x0bc5,0x0b0f,0x0a52,0x098f,0x08c8, + 0x0800,0x0737,0x0670,0x05ad,0x04f0,0x043a,0x038e,0x02ed,0x0258,0x01d1,0x0159,0x00f2,0x009c,0x0058,0x0027,0x000a, + 0x0000,0x000a,0x0027,0x0058,0x009c,0x00f2,0x0159,0x01d1,0x0258,0x02ed,0x038e,0x043a,0x04f0,0x05ad,0x0670,0x0737 +}; + +static size_t lut_size = sizeof(lut) / sizeof(lut[0]); + +void setup() { + Serial.begin(9600); + if (!dac1.begin(AN_RESOLUTION_12, 32000 * lut_size, 64, 128)) { + Serial.println("Failed to start DAC1 !"); + while (1); + } +} + +void loop() { + static size_t lut_offs = 0; + + if (dac1.available()) { + // Get a free buffer for writing. + SampleBuffer buf = dac1.dequeue(); + + // Write data to buffer. + for (size_t i=0; i + +#define N_SAMPLES (256) +#define DEFAULT_FREQUENCY (16000) + +AdvancedDAC dac1(A12); +uint8_t SAMPLES_BUFFER[N_SAMPLES]; +size_t dac_frequency = DEFAULT_FREQUENCY; + +void generate_waveform(int cmd) +{ + switch (cmd) { + case 't': + // Triangle wave + Serial.print("Waveform: Triangle "); + for (int i=0; i 1000) { + dac_frequency /= 2; + } else { + break; + } + + dac1.stop(); + delay(500); + if (!dac1.begin(AN_RESOLUTION_8, dac_frequency * N_SAMPLES, N_SAMPLES, 32)) { + Serial.println("Failed to start DAC1 !"); + } + delay(500); + break; + + default: + Serial.print("Unknown command "); + Serial.println((char) cmd); + return; + } + + Serial.print(dac_frequency/1000); + Serial.println("KHz"); +} + +void setup() { + Serial.begin(115200); + + while (!Serial) { + + } + + + Serial.println("Enter a command:"); + Serial.println("t: Triangle wave"); + Serial.println("q: Square wave"); + Serial.println("s: Sine wave"); + Serial.println("r: Sawtooth wave"); + Serial.println("+: Increase frequency"); + Serial.println("-: Decrease frequency"); + + generate_waveform('s'); + + // DAC initialization + if (!dac1.begin(AN_RESOLUTION_8, DEFAULT_FREQUENCY * N_SAMPLES, N_SAMPLES, 32)) { + Serial.println("Failed to start DAC1 !"); + while (1); + } +} + +void loop() { + if (Serial.available() > 0) { + int cmd = Serial.read(); + if (cmd != '\n') { + generate_waveform(cmd); + } + } + + if (dac1.available()) { + // Get a free buffer for writing. + SampleBuffer buf = dac1.dequeue(); + + // Write data to buffer. + for (size_t i=0; i +#include +#include +#include + +AdvancedDAC dac1(A12); + +USBHostMSD msd; +mbed::FATFileSystem usb("USB_DRIVE"); + +FILE * file = nullptr; +int sample_size = 0; +int samples_count = 0; + + +void setup() +{ + Serial.begin(115200); + while (!Serial); + + /* Enable power for HOST USB connector. */ + pinMode(PA_15, OUTPUT); + digitalWrite(PA_15, HIGH); + + Serial.println("Please connect a USB stick to the GIGA's USB port ..."); + while (!msd.connect()) delay(100); + + Serial.println("Mounting USB device ..."); + int const rc_mount = usb.mount(&msd); + if (rc_mount) + { + Serial.print("Error mounting USB device "); + Serial.println(rc_mount); + return; + } + + Serial.println("Opening audio file ..."); + + /* 16-bit PCM Mono 16kHz realigned noise reduction */ + file = fopen("/USB_DRIVE/AUDIO_SAMPLE.wav", "rb"); + if (file == nullptr) + { + Serial.print("Error opening audio file: "); + Serial.println(strerror(errno)); + return; + } + + Serial.println("Reading audio header ..."); + struct wav_header_t + { + char chunkID[4]; //"RIFF" = 0x46464952 + unsigned long chunkSize; //28 [+ sizeof(wExtraFormatBytes) + wExtraFormatBytes] + sum(sizeof(chunk.id) + sizeof(chunk.size) + chunk.size) + char format[4]; //"WAVE" = 0x45564157 + char subchunk1ID[4]; //"fmt " = 0x20746D66 + unsigned long subchunk1Size; //16 [+ sizeof(wExtraFormatBytes) + wExtraFormatBytes] + unsigned short audioFormat; + unsigned short numChannels; + unsigned long sampleRate; + unsigned long byteRate; + unsigned short blockAlign; + unsigned short bitsPerSample; + }; + + wav_header_t header; + fread(&header, sizeof(header), 1, file); + + Serial.println("WAV File Header read:"); + char msg[64] = {0}; + snprintf(msg, sizeof(msg), "File Type: %s", header.chunkID); + Serial.println(msg); + snprintf(msg, sizeof(msg), "File Size: %ld", header.chunkSize); + Serial.println(msg); + snprintf(msg, sizeof(msg), "WAV Marker: %s", header.format); + Serial.println(msg); + snprintf(msg, sizeof(msg), "Format Name: %s", header.subchunk1ID); + Serial.println(msg); + snprintf(msg, sizeof(msg), "Format Length: %ld", header.subchunk1Size); + Serial.println(msg); + snprintf(msg, sizeof(msg), "Format Type: %hd", header.audioFormat); + Serial.println(msg); + snprintf(msg, sizeof(msg), "Number of Channels: %hd", header.numChannels); + Serial.println(msg); + snprintf(msg, sizeof(msg), "Sample Rate: %ld", header.sampleRate); + Serial.println(msg); + snprintf(msg, sizeof(msg), "Sample Rate * Bits/Sample * Channels / 8: %ld", header.byteRate); + Serial.println(msg); + snprintf(msg, sizeof(msg), "Bits per Sample * Channels / 8: %hd", header.blockAlign); + Serial.println(msg); + snprintf(msg, sizeof(msg), "Bits per Sample: %hd", header.bitsPerSample); + Serial.println(msg); + + /* Find the data section of the WAV file. */ + struct chunk_t + { + char ID[4]; + unsigned long size; + }; + + chunk_t chunk; + snprintf(msg, sizeof(msg), "id\t" "size"); + Serial.println(msg); + /* Find data chunk. */ + while (true) + { + fread(&chunk, sizeof(chunk), 1, file); + snprintf(msg, sizeof(msg), "%c%c%c%c\t" "%li", chunk.ID[0], chunk.ID[1], chunk.ID[2], chunk.ID[3], chunk.size); + Serial.println(msg); + if (*(unsigned int *) &chunk.ID == 0x61746164) + break; + /* Skip chunk data bytes. */ + fseek(file, chunk.size, SEEK_CUR); + } + + /* Determine number of samples. */ + sample_size = header.bitsPerSample / 8; + samples_count = chunk.size * 8 / header.bitsPerSample; + snprintf(msg, sizeof(msg), "Sample size = %i", sample_size); Serial.println(msg); + snprintf(msg, sizeof(msg), "Samples count = %i", samples_count); Serial.println(msg); + + /* Configure the advanced DAC. */ + if (!dac1.begin(AN_RESOLUTION_12, header.sampleRate, 256, 16)) + { + Serial.println("Failed to start DAC1 !"); + return; + } +} + +void loop() +{ + if (dac1.available() && !feof(file)) + { + /* Read data from file. */ + uint16_t sample_data[256] = {0}; + fread(sample_data, sample_size, 256, file); + + /* Get a free buffer for writing. */ + SampleBuffer buf = dac1.dequeue(); + + /* Write data to buffer. */ + for (size_t i = 0; i < buf.size(); i++) + { + /* Scale down to 12 bit. */ + uint16_t const dac_val = ((static_cast(sample_data[i])+32768)>>4) & 0x0fff; + buf[i] = dac_val; + } + + /* Write the buffer to DAC. */ + dac1.write(buf); + } +} +``` + +### Loop Multiple Audio Files + +This example is similar to the **Play Single Audio File** example, but with some key changes: + +- This example uses multiple audio files. +- The file read is moved to a separate function, `configFile()`, as it will be continuously called from the sketch. +- Instead of playing a file once, it keeps looping it. +- The **BOOT0** (`PC_13`) button (right next to the audio jack) is used as a regular pushbutton to loop through the audio files. +- Pressing the button changes the file played. + +The files used are called `DRUM.wav`, `WARP.wav`, `BASS.wav` and `SHAKE.wav`. They are very short (around 1 second). These needs to be present on the USB stick used. + +You can download them from [this link](/resources/misc/giga_audio_examples.zip). + +```arduino +/* + * GIGA R1 - Audio Playback + * Simple wav format audio playback via 12-Bit DAC output by reading from a USB drive. + * In order for this sketch to work you need to rename 'USB_DRIVE' to the name of your USB stick drive. + * Furthermore you need to store the provided audio file AUDIO_SAMPLE.wav on it. +*/ + +#include +#include +#include +#include + +AdvancedDAC dac1(A12); + +USBHostMSD msd; +mbed::FATFileSystem usb("usb"); + +FILE *file = nullptr; +int sample_size = 0; +int samples_count = 0; + +int swapFile; + +void setup() { + Serial.begin(115200); + while (!Serial) + ; + + /* Enable power for HOST USB connector. */ + + pinMode(PA_15, OUTPUT); + digitalWrite(PA_15, HIGH); + + Serial.println("Please connect a USB stick to the GIGA's USB port ..."); + while (!msd.connect()) delay(100); + + Serial.println("Mounting USB device ..."); + int const rc_mount = usb.mount(&msd); + if (rc_mount) { + Serial.print("Error mounting USB device "); + Serial.println(rc_mount); + return; + } + configFile(); +} + +void loop() { + if (dac1.available() && !feof(file)) { + /* Read data from file. */ + uint16_t sample_data[256] = { 0 }; + fread(sample_data, sample_size, 256, file); + + /* Get a free buffer for writing. */ + SampleBuffer buf = dac1.dequeue(); + + /* Write data to buffer. */ + for (size_t i = 0; i < buf.size(); i++) { + /* Scale down to 12 bit. */ + uint16_t const dac_val = ((static_cast(sample_data[i]) + 32768) >> 4) & 0x0fff; + buf[i] = dac_val; + } + + /* Write the buffer to DAC. */ + dac1.write(buf); + + if(feof(file)){ + fclose(file); + configFile(); + } + } + + int buttonState = digitalRead(PC_13); + + if (buttonState == 1) { + swapFile = swapFile + 1; + if (swapFile == 4) { + swapFile = 0; + } + delay(500); + configFile(); + } +} + + +void configFile() { + Serial.println("Opening audio file ..."); + + /* 16-bit PCM Mono 16kHz realigned noise reduction */ + if (swapFile == 0) { + file = fopen("/usb/DRUM.wav", "rb"); + } else if (swapFile == 1) { + file = fopen("/usb/WARP.wav", "rb"); + } else if (swapFile == 2) { + file = fopen("/usb/BASS.wav", "rb"); + } else if (swapFile == 3) { + file = fopen("/usb/SHAKE.wav", "rb"); + } + + if (file == nullptr) { + Serial.print("Error opening audio file: "); + Serial.println(strerror(errno)); + return; + } + + Serial.println("Reading audio header ..."); + struct wav_header_t { + char chunkID[4]; //"RIFF" = 0x46464952 + unsigned long chunkSize; //28 [+ sizeof(wExtraFormatBytes) + wExtraFormatBytes] + sum(sizeof(chunk.id) + sizeof(chunk.size) + chunk.size) + char format[4]; //"WAVE" = 0x45564157 + char subchunk1ID[4]; //"fmt " = 0x20746D66 + unsigned long subchunk1Size; //16 [+ sizeof(wExtraFormatBytes) + wExtraFormatBytes] + unsigned short audioFormat; + unsigned short numChannels; + unsigned long sampleRate; + unsigned long byteRate; + unsigned short blockAlign; + unsigned short bitsPerSample; + }; + + wav_header_t header; + fread(&header, sizeof(header), 1, file); + + Serial.println("WAV File Header read:"); + char msg[64] = { 0 }; + snprintf(msg, sizeof(msg), "File Type: %s", header.chunkID); + Serial.println(msg); + snprintf(msg, sizeof(msg), "File Size: %ld", header.chunkSize); + Serial.println(msg); + snprintf(msg, sizeof(msg), "WAV Marker: %s", header.format); + Serial.println(msg); + snprintf(msg, sizeof(msg), "Format Name: %s", header.subchunk1ID); + Serial.println(msg); + snprintf(msg, sizeof(msg), "Format Length: %ld", header.subchunk1Size); + Serial.println(msg); + snprintf(msg, sizeof(msg), "Format Type: %hd", header.audioFormat); + Serial.println(msg); + snprintf(msg, sizeof(msg), "Number of Channels: %hd", header.numChannels); + Serial.println(msg); + snprintf(msg, sizeof(msg), "Sample Rate: %ld", header.sampleRate); + Serial.println(msg); + snprintf(msg, sizeof(msg), "Sample Rate * Bits/Sample * Channels / 8: %ld", header.byteRate); + Serial.println(msg); + snprintf(msg, sizeof(msg), "Bits per Sample * Channels / 8: %hd", header.blockAlign); + Serial.println(msg); + snprintf(msg, sizeof(msg), "Bits per Sample: %hd", header.bitsPerSample); + Serial.println(msg); + + /* Find the data section of the WAV file. */ + struct chunk_t { + char ID[4]; + unsigned long size; + }; + + chunk_t chunk; + snprintf(msg, sizeof(msg), "id\t" + "size"); + Serial.println(msg); + /* Find data chunk. */ + while (true) { + fread(&chunk, sizeof(chunk), 1, file); + snprintf(msg, sizeof(msg), "%c%c%c%c\t" + "%li", + chunk.ID[0], chunk.ID[1], chunk.ID[2], chunk.ID[3], chunk.size); + Serial.println(msg); + if (*(unsigned int *)&chunk.ID == 0x61746164) + break; + /* Skip chunk data bytes. */ + fseek(file, chunk.size, SEEK_CUR); + } + + /* Determine number of samples. */ + sample_size = header.bitsPerSample / 8; + samples_count = chunk.size * 8 / header.bitsPerSample; + snprintf(msg, sizeof(msg), "Sample size = %i", sample_size); + Serial.println(msg); + snprintf(msg, sizeof(msg), "Samples count = %i", samples_count); + Serial.println(msg); + + /* Configure the advanced DAC. */ + if (!dac1.begin(AN_RESOLUTION_12, header.sampleRate, 256, 16)) { + Serial.println("Failed to start DAC1 !"); + return; + } +} +``` + +## Pulse Density Modulation Support + +Pulse Density Support (PDM) is a form of modulation used to represent analog information into digital information; PDM uses a high-frequency stream of 1-bit digital samples. In PDM, a large cluster of ones represents a positive amplitude, while a large cluster of zeros represents a negative amplitude. + +The GIGA R1 PDM support can be used with the [built-in PDM library](https://docs.arduino.cc/learn/built-in-libraries/pdm). Let's check an interesting example that shows of how to read a PDM microphone wwith the GIGA R1: + +```arduino +#include + +// Default number of output channels +static const char channels = 1; + +// Default PCM output frequency +static const int frequency = 16000; + +// Buffer to read samples into, each sample is 16-bits +short sampleBuffer[128]; + +// Number of audio samples read +volatile int samplesRead; + +void setup() { + Serial.begin(9600); + while (!Serial); + + // Configure the callback function and gain + PDM.onReceive(onPDMdata); + PDM.setGain(30); + + // Initialize PDM microphone in mono mode, and a 16 kHz sample rate: + if (!PDM.begin(channels, frequency)) { + Serial.println("Failed to start PDM!"); + while (1); + } +} + +void loop() { + // Wait for samples to be read + if (samplesRead) { + + // Print samples to the Serial Monitor + for (int i = 0; i < samplesRead; i++) { + if(channels == 2) { + Serial.print("L:"); + Serial.print(sampleBuffer[i]); + Serial.print(" R:"); + i++; + } + Serial.println(sampleBuffer[i]); + } + + samplesRead = 0; + } +} + +// Callback function +void onPDMdata() { + int bytesAvailable = PDM.available(); + PDM.read(sampleBuffer, bytesAvailable); + samplesRead = bytesAvailable / 2; +} ``` \ No newline at end of file diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-audio/hero-banner.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-audio/hero-banner.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-audio/hero-banner.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-audio/hero-banner.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-camera/assets/camera-connector-photo.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-camera/assets/camera-connector-photo.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-camera/assets/camera-connector-photo.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-camera/assets/camera-connector-photo.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-camera/assets/camera-connector-pins.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-camera/assets/camera-connector-pins.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-camera/assets/camera-connector-pins.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-camera/assets/camera-connector-pins.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-camera/assets/camera-connector-zoomed.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-camera/assets/camera-connector-zoomed.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-camera/assets/camera-connector-zoomed.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-camera/assets/camera-connector-zoomed.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-camera/assets/camera-schematic.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-camera/assets/camera-schematic.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-camera/assets/camera-schematic.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-camera/assets/camera-schematic.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-camera/assets/processing-example.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-camera/assets/processing-example.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-camera/assets/processing-example.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-camera/assets/processing-example.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-camera/giga-camera.md b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-camera/giga-camera.md similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-camera/giga-camera.md rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-camera/giga-camera.md diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-camera/hero-banner.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-camera/hero-banner.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-camera/hero-banner.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-camera/hero-banner.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-dual-core/assets/flash-split.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-dual-core/assets/flash-split.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-dual-core/assets/flash-split.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-dual-core/assets/flash-split.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-dual-core/assets/target-core.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-dual-core/assets/target-core.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-dual-core/assets/target-core.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-dual-core/assets/target-core.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-dual-core/giga-dual-core.md b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-dual-core/giga-dual-core.md similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-dual-core/giga-dual-core.md rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-dual-core/giga-dual-core.md diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-dual-core/hero-banner.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-dual-core/hero-banner.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-dual-core/hero-banner.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-dual-core/hero-banner.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-getting-started/assets/giga-connected.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-getting-started/assets/giga-connected.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-getting-started/assets/giga-connected.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-getting-started/assets/giga-connected.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-getting-started/assets/giga-examples.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-getting-started/assets/giga-examples.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-getting-started/assets/giga-examples.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-getting-started/assets/giga-examples.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-getting-started/assets/install-giga-core.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-getting-started/assets/install-giga-core.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-getting-started/assets/install-giga-core.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-getting-started/assets/install-giga-core.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-getting-started/assets/open-ide.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-getting-started/assets/open-ide.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-getting-started/assets/open-ide.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-getting-started/assets/open-ide.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-getting-started/giga-getting-started.md b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-getting-started/giga-getting-started.md similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-getting-started/giga-getting-started.md rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-getting-started/giga-getting-started.md diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-getting-started/hero-banner.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-getting-started/hero-banner.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-getting-started/hero-banner.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-getting-started/hero-banner.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-micropython/assets/giga-main-boot.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-micropython/assets/giga-main-boot.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-micropython/assets/giga-main-boot.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-micropython/assets/giga-main-boot.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-micropython/assets/giga-msd.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-micropython/assets/giga-msd.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-micropython/assets/giga-msd.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-micropython/assets/giga-msd.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-micropython/giga-micropython.md b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-micropython/giga-micropython.md similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-micropython/giga-micropython.md rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-micropython/giga-micropython.md diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-micropython/hero-banner.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-micropython/hero-banner.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-micropython/hero-banner.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-micropython/hero-banner.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-usb/assets/giga-file-write.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-usb/assets/giga-file-write.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-usb/assets/giga-file-write.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-usb/assets/giga-file-write.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-usb/assets/giga-keyboard-connect.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-usb/assets/giga-keyboard-connect.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-usb/assets/giga-keyboard-connect.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-usb/assets/giga-keyboard-connect.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-usb/assets/usb-connectors.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-usb/assets/usb-connectors.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-usb/assets/usb-connectors.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-usb/assets/usb-connectors.png diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-usb/giga-usb.md b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-usb/giga-usb.md similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-usb/giga-usb.md rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-usb/giga-usb.md diff --git a/content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-usb/hero-banner.png b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-usb/hero-banner.png similarity index 100% rename from content/hardware/09.mega/boards/giga-r1-wifi/tutorials/giga-usb/hero-banner.png rename to content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-usb/hero-banner.png diff --git a/content/hardware/09.mega/boards/mega-2560/certifications/Arduino_A000067-DoC_CE.pdf b/content/hardware/10.mega/boards/mega-2560/certifications/Arduino_A000067-DoC_CE.pdf similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/certifications/Arduino_A000067-DoC_CE.pdf rename to content/hardware/10.mega/boards/mega-2560/certifications/Arduino_A000067-DoC_CE.pdf diff --git a/content/hardware/09.mega/boards/mega-2560/certifications/Arduino_A000067-DoC_FCC.pdf b/content/hardware/10.mega/boards/mega-2560/certifications/Arduino_A000067-DoC_FCC.pdf similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/certifications/Arduino_A000067-DoC_FCC.pdf rename to content/hardware/10.mega/boards/mega-2560/certifications/Arduino_A000067-DoC_FCC.pdf diff --git a/content/hardware/09.mega/boards/mega-2560/certifications/Arduino_A000067-DoC_UKCA.pdf b/content/hardware/10.mega/boards/mega-2560/certifications/Arduino_A000067-DoC_UKCA.pdf similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/certifications/Arduino_A000067-DoC_UKCA.pdf rename to content/hardware/10.mega/boards/mega-2560/certifications/Arduino_A000067-DoC_UKCA.pdf diff --git a/content/hardware/09.mega/boards/mega-2560/compatibility.yml b/content/hardware/10.mega/boards/mega-2560/compatibility.yml similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/compatibility.yml rename to content/hardware/10.mega/boards/mega-2560/compatibility.yml diff --git a/content/hardware/09.mega/boards/mega-2560/datasheet/assets/ArduinoFeatureImage.png b/content/hardware/10.mega/boards/mega-2560/datasheet/assets/ArduinoFeatureImage.png similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/datasheet/assets/ArduinoFeatureImage.png rename to content/hardware/10.mega/boards/mega-2560/datasheet/assets/ArduinoFeatureImage.png diff --git a/content/hardware/09.mega/boards/mega-2560/datasheet/assets/ArduinoMEGAMountHoles.png b/content/hardware/10.mega/boards/mega-2560/datasheet/assets/ArduinoMEGAMountHoles.png similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/datasheet/assets/ArduinoMEGAMountHoles.png rename to content/hardware/10.mega/boards/mega-2560/datasheet/assets/ArduinoMEGAMountHoles.png diff --git a/content/hardware/09.mega/boards/mega-2560/datasheet/assets/ArduinoMEGAOutline.png b/content/hardware/10.mega/boards/mega-2560/datasheet/assets/ArduinoMEGAOutline.png similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/datasheet/assets/ArduinoMEGAOutline.png rename to content/hardware/10.mega/boards/mega-2560/datasheet/assets/ArduinoMEGAOutline.png diff --git a/content/hardware/09.mega/boards/mega-2560/datasheet/assets/ArduinoMEGAPinOut.png b/content/hardware/10.mega/boards/mega-2560/datasheet/assets/ArduinoMEGAPinOut.png similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/datasheet/assets/ArduinoMEGAPinOut.png rename to content/hardware/10.mega/boards/mega-2560/datasheet/assets/ArduinoMEGAPinOut.png diff --git a/content/hardware/09.mega/boards/mega-2560/datasheet/assets/ArduinoMEGAPinOut2.png b/content/hardware/10.mega/boards/mega-2560/datasheet/assets/ArduinoMEGAPinOut2.png similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/datasheet/assets/ArduinoMEGAPinOut2.png rename to content/hardware/10.mega/boards/mega-2560/datasheet/assets/ArduinoMEGAPinOut2.png diff --git a/content/hardware/09.mega/boards/mega-2560/datasheet/assets/ArduinoMEGATopView.png b/content/hardware/10.mega/boards/mega-2560/datasheet/assets/ArduinoMEGATopView.png similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/datasheet/assets/ArduinoMEGATopView.png rename to content/hardware/10.mega/boards/mega-2560/datasheet/assets/ArduinoMEGATopView.png diff --git a/content/hardware/09.mega/boards/mega-2560/datasheet/assets/Block_Diagram_Mega2560.png b/content/hardware/10.mega/boards/mega-2560/datasheet/assets/Block_Diagram_Mega2560.png similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/datasheet/assets/Block_Diagram_Mega2560.png rename to content/hardware/10.mega/boards/mega-2560/datasheet/assets/Block_Diagram_Mega2560.png diff --git a/content/hardware/09.mega/boards/mega-2560/datasheet/assets/Power_Tree_Mega_2560_Rev2.svg b/content/hardware/10.mega/boards/mega-2560/datasheet/assets/Power_Tree_Mega_2560_Rev2.svg similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/datasheet/assets/Power_Tree_Mega_2560_Rev2.svg rename to content/hardware/10.mega/boards/mega-2560/datasheet/assets/Power_Tree_Mega_2560_Rev2.svg diff --git a/content/hardware/09.mega/boards/mega-2560/datasheet/datasheet.md b/content/hardware/10.mega/boards/mega-2560/datasheet/datasheet.md similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/datasheet/datasheet.md rename to content/hardware/10.mega/boards/mega-2560/datasheet/datasheet.md diff --git a/content/hardware/09.mega/boards/mega-2560/downloads/A000067-full-pinout.pdf b/content/hardware/10.mega/boards/mega-2560/downloads/A000067-full-pinout.pdf similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/downloads/A000067-full-pinout.pdf rename to content/hardware/10.mega/boards/mega-2560/downloads/A000067-full-pinout.pdf diff --git a/content/hardware/09.mega/boards/mega-2560/downloads/eagle-files.zip b/content/hardware/10.mega/boards/mega-2560/downloads/eagle-files.zip similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/downloads/eagle-files.zip rename to content/hardware/10.mega/boards/mega-2560/downloads/eagle-files.zip diff --git a/content/hardware/09.mega/boards/mega-2560/downloads/fritzing.fzpz b/content/hardware/10.mega/boards/mega-2560/downloads/fritzing.fzpz similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/downloads/fritzing.fzpz rename to content/hardware/10.mega/boards/mega-2560/downloads/fritzing.fzpz diff --git a/content/hardware/09.mega/boards/mega-2560/downloads/schematics.pdf b/content/hardware/10.mega/boards/mega-2560/downloads/schematics.pdf similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/downloads/schematics.pdf rename to content/hardware/10.mega/boards/mega-2560/downloads/schematics.pdf diff --git a/content/hardware/09.mega/boards/mega-2560/essentials.md b/content/hardware/10.mega/boards/mega-2560/essentials.md similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/essentials.md rename to content/hardware/10.mega/boards/mega-2560/essentials.md diff --git a/content/hardware/09.mega/boards/mega-2560/features.md b/content/hardware/10.mega/boards/mega-2560/features.md similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/features.md rename to content/hardware/10.mega/boards/mega-2560/features.md diff --git a/content/hardware/09.mega/boards/mega-2560/image.svg b/content/hardware/10.mega/boards/mega-2560/image.svg similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/image.svg rename to content/hardware/10.mega/boards/mega-2560/image.svg diff --git a/content/hardware/09.mega/boards/mega-2560/interactive/A000067-altium.zip.gpg b/content/hardware/10.mega/boards/mega-2560/interactive/A000067-altium.zip.gpg similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/interactive/A000067-altium.zip.gpg rename to content/hardware/10.mega/boards/mega-2560/interactive/A000067-altium.zip.gpg diff --git a/content/hardware/09.mega/boards/mega-2560/interactive/A000067-pinout.png b/content/hardware/10.mega/boards/mega-2560/interactive/A000067-pinout.png similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/interactive/A000067-pinout.png rename to content/hardware/10.mega/boards/mega-2560/interactive/A000067-pinout.png diff --git a/content/hardware/09.mega/boards/mega-2560/product.md b/content/hardware/10.mega/boards/mega-2560/product.md similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/product.md rename to content/hardware/10.mega/boards/mega-2560/product.md diff --git a/content/hardware/09.mega/boards/mega-2560/suggestions.md b/content/hardware/10.mega/boards/mega-2560/suggestions.md similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/suggestions.md rename to content/hardware/10.mega/boards/mega-2560/suggestions.md diff --git a/content/hardware/09.mega/boards/mega-2560/tech-specs.md b/content/hardware/10.mega/boards/mega-2560/tech-specs.md similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/tech-specs.md rename to content/hardware/10.mega/boards/mega-2560/tech-specs.md diff --git a/content/hardware/09.mega/boards/mega-2560/tech-specs.yml b/content/hardware/10.mega/boards/mega-2560/tech-specs.yml similarity index 100% rename from content/hardware/09.mega/boards/mega-2560/tech-specs.yml rename to content/hardware/10.mega/boards/mega-2560/tech-specs.yml diff --git a/content/hardware/09.mega/family.md b/content/hardware/10.mega/family.md similarity index 96% rename from content/hardware/09.mega/family.md rename to content/hardware/10.mega/family.md index e7e8573870..afe67ea8b1 100644 --- a/content/hardware/09.mega/family.md +++ b/content/hardware/10.mega/family.md @@ -1,4 +1,4 @@ ---- -title: Mega -description: The largest Arduino form factor with a lot of GPIOs. +--- +title: Mega +description: The largest Arduino form factor with a lot of GPIOs. --- \ No newline at end of file diff --git a/content/hardware/09.mega/image-480.png b/content/hardware/10.mega/image-480.png similarity index 100% rename from content/hardware/09.mega/image-480.png rename to content/hardware/10.mega/image-480.png diff --git a/content/hardware/09.mega/image.png b/content/hardware/10.mega/image.png similarity index 100% rename from content/hardware/09.mega/image.png rename to content/hardware/10.mega/image.png