Arduino: Difference between revisions

Content deleted Content added
wrougo[ti4hp1j2ct hb;k2jqcu4pootuj 1[oi32hyo rizzz
Tag: Reverted
m Reverted edits by 115.98.233.52 (talk): nonconstructive edits (HG) (3.4.12)
 
(40 intermediate revisions by 33 users not shown)
Line 4:
{{Infobox information appliance
| name = Arduino
| logo = [[File:Arduino_Logo_Registered.svg|50px]] [[File:Genuino{{!}}class=skin-Logo.svg|50px]]invert
| logo_upright = 0.6
| image = [[File:Arduino Uno - R3.jpg|220px]]
| caption = [[Arduino Uno]] SMD R3
| manufacturer = Arduino
Line 17 ⟶ 18:
| storage = [[Flash memory|Flash]], [[EEPROM]]
| memory = [[Static random-access memory|SRAM]]
| os = None, with bootloader (default) <br> [[Xinu]] <br> [[FreeRTOS]]
| website = {{URL|https://www.arduino.cc/|arduino.cc}}
}}
 
'''Arduino''' ({{IPAc-en|ɑː|r|ˈ|d|w|iː|n|oʊ}}) is an Italian [[open-source hardware]] and [[open-source software|software]] company, project, and user community that designs and manufactures [[single-board microcontroller]]s and [[microcontroller]] kits for building digital devices. Its hardware products are licensriewlicensed under a [[Creative Commons license|CC BY-SA license]], while the software is licensed under the [[GNU Lesser General Public License]] (LGPL) or the [[GNU General Public License]] (GPL),<ref>{{Cite web |title=Getting Started: FOUNDATION > Introduction |url=https://www.arduino.cc/en/guide/introduction |url-status=dead |archive-url=https://web.archive.org/web/20170829015201/https://www.arduino.cc/en/Guide/Introduction |archive-date=2017-08-29 |access-date=2017-05-23 |website=arduino.cc}}</ref> permitting the [[manufacture]] of Arduino boards and software distribution by anyone. Arduino boards are available commercially from the official [[website]] or through authorized distributors.<ref>{{Cite web |title=Arduino - Home |url=https://www.arduino.cc/ |access-date=2022-10-27 |website=www.arduino.cc}}</ref>
 
Arduino board designs use a variety of [[microprocessor]]s and controllers. The boards are equipped with sets of digital and analog [[input/output]] (I/O) pins that may be interfaced to various expansion boards ('shields') or [[breadboards]] (for prototyping) and other circuits. The boards feature serial communications interfaces, including [[Universal Serial Bus]] (USB) on some models, which are also used for loading programs. The microcontrollers can be programmed using the [[C (programming language)|C]] and [[C++]] [[programming language]]s (Embedded C), using a standard API which is also known as the '''Arduino Programming Language''', inspired by the [[Processing (programming language)|Processing language]] and used with a modified version of the Processing IDE. In addition to using traditional [[compiler]] [[toolchains]], the Arduino project provides an [[integrated development environment]] (IDE) and a [[Command-line interface|command line]] tool developed in [[Go (programming language)|Go]].
 
The Arduino project began in 2005 as a tool for students at the [[Interaction Design Institute Ivrea]], Italy,<ref name="kushner">{{Cite journal |last=Kushner |first=David |date=2011-10-26 |title=The Making of Arduino |url=https://spectrum.ieee.org/the-making-of-arduino |journal=[[IEEE Spectrum]]}}</ref> aiming to provide a low-cost and easy way for novices and professionals to create devices that interact with their environment using [[sensor]]s and [[actuator]]s. Common examples of such devices intended for beginner[[Maker hobbyistsculture|makers]] include simple [[robot]]s, [[thermostat]]s, and [[motion detector]]s.
 
The name ''Arduino'' comes from a café in [[Ivrea]], Italy, where some of the project's founders used to meet. The bar was named after [[Arduin of Ivrea]], who was the [[margrave]] of the [[March of Ivrea]] and [[King of Italy]] from 1002 to 1014.<ref>{{Cite journal |last=Lahart |first=Justin |date=27 November 2009 |title=Taking an Open-Source Approach to Hardware |url=https://www.wsj.com/articles/SB10001424052748703499404574559960271468066 |journal=[[The Wall Street Journal]] |access-date=2014-09-07}}</ref>
Line 33 ⟶ 34:
===Founding===
[[File:The first Arduino.jpeg|thumb|The first prototype<ref name="kushner" />]]
The Arduino project was started at the [[Interaction Design Institute Ivrea]] (IDII) in [[Ivrea]], Italy.<ref name="kushner" /> At that time, the students used a [[BASIC Stamp]] [[microcontroller]] at a cost of $50. In 2004, [[Hernando Barragán]] created the development platform ''[[Wiring (development platform)|Wiring]]'' as a Master's thesis project at IDII, under the supervision of Massimo Banzi and [[Casey Reas]]. Casey Reas is known for co-creating, with Ben Fry, the [[Processing]] development platform. The project goal was to create simple, low cost tools for creating digital projects by non-engineers. The Wiring platform consisted of a [[printed circuit board]] (PCB) with an [[ATmega]]128 microcontroller, an IDE based on Processing and library functions to easily program the microcontroller.<ref name=":0">{{Cite web |last=Barragán |first=Hernando |date=2016-01-01 |title=The Untold History of Arduino |url=https://arduinohistory.github.io |access-date=2016-03-06 |website=arduinohistory.github.io}}</ref> In 2005, Massimo Banzi, with David Mellis, another IDII student, and David Cuartielles, extended Wiring by adding support for the cheaper ATmega8 microcontroller. The new project, forked from Wiring, was called ''Arduino''.<ref name=":0" />
In 2005, Massimo Banzi, with David Mellis, another IDII student, and David Cuartielles, extended Wiring by adding support for the cheaper ATmega8 microcontroller. The new project, forked from Wiring, was called ''Arduino''.<ref name=":0" />
 
The initial Arduino core team consisted of Massimo Banzi, David Cuartielles, Tom Igoe, Gianluca Martino, and David Mellis.<ref name="kushner" />
Line 53:
In April 2017, [[Wired (magazine)|Wired]] reported that Musto had "fabricated his academic record... On his company's website, personal LinkedIn accounts, and even on Italian business documents, Musto was, until recently, listed as holding a Ph.D. from the Massachusetts Institute of Technology. In some cases, his biography also claimed an MBA from New York University." Wired reported that neither university had any record of Musto's attendance, and Musto later admitted in an interview with Wired that he had never earned those degrees.<ref>{{Cite magazine |title=Arduino's New CEO, Federico Musto, May Have Fabricated His Academic Record |url=https://www.wired.com/2017/04/arduinos-new-ceo-federico-musto-may-fabricated-academic-record/ |magazine=WIRED |language=en-US |access-date=2017-12-22}}</ref> The controversy surrounding Musto continued when, in July 2017, he reportedly pulled many [[open source]] licenses, schematics, and code from the Arduino website, prompting scrutiny and outcry.<ref>{{Cite news |last=Biggs |first=John |title=CEO controversy mars Arduino's open future |language=en |work=TechCrunch |url=https://techcrunch.com/2017/07/26/ceo-controversy-mars-arduinos-open-future/ |access-date=2017-12-22}}</ref>
 
By 2017 Arduino 'AG' owned many Arduino trademarks. In July 2017 BCMI, founded by Massimo Banzi, David Cuartielles, David Mellis and Tom Igoe, acquired Arduino AG and all the Arduino trademarks. Fabio Violante is the new CEO replacing Federico Musto, who no longer works for Arduino AG.<ref>{{Cite web |date=28 July 2017 |title=Arduino Blog – A new era for Arduino begins today |url=https://blog.arduino.cc/2017/07/28/a-new-era-for-arduino-begins-today/ |access-date=19 Jan 2018 |website=Arduino Blog}}</ref><ref>{{Cite web |last=Davis |first=Tom |date=31 July 2017 |title=BCMI Acquires Arduino AG and Makers Breathe a Sigh of Relief |url=https://techwombat.com/bcmi-acquires-arduino-ag-makers-breathe-sigh-relief/ |access-date=29 November 2018 |website=techwombat.com}}</ref>
 
=== Post-dispute ===
Line 79:
[[File:UnoConnections.jpg|thumb|An official Arduino Uno R2 with descriptions of the I/O locations]]
 
The Arduino board exposes most of the microcontroller's I/O pins for use by other circuits. The ''Diecimila'',{{Efn|name="N10000"|''Diecimila'' means "ten thousand" in Italian}} ''Duemilanove'',{{Efn|name="N2009"|''Duemilanove'' means "two thousand and nine" in Italian}} and current ''Uno''{{Efn|name="N1"|''Uno'' means "one" in Italian}} provide 14 digital I/O pins, six of which can produce [[pulse-width modulation|pulse-width modulated]](PWM) signals, and six [[Analog signal|analog]] inputs, which can also be used as six digital I/O pins. These pins are on the top of the board, via female 0.1-inch (2.54&nbsp;mm) headers. Several plug-in application shields are also commercially available. The Arduino Nano and Arduino-compatible Bare Bones Board<ref>{{Cite web |title=Bare Bones Board (BBB) Kit |url=http://moderndevice.com/product/bare-bones-board-bbb-kit/ |access-date=29 November 2018 |website=moderndevice.com |archive-date=30 July 2013 |archive-url=https://web.archive.org/web/20130730012610/http://moderndevice.com/product/bare-bones-board-bbb-kit/ |url-status=dead }}</ref> and Boarduino<ref>{{Cite web |title=DC Boarduino (Arduino compatible) Kit (w/ATmega328) - v1.0 |url=https://www.adafruit.com/products/72 |access-date=29 November 2018 |website=adafruit.com}}</ref> boards may provide male header pins on the underside of the board that can plug into solderless [[breadboard]]s.
 
Many Arduino-compatible and Arduino-derived boards exist. Some are functionally equivalent to an Arduino and can be used interchangeably. Many enhance the basic Arduino by adding output drivers, often for use in school-level education,<ref>{{Cite journal |last1=Di Tore |first1=Stefano |last2=Todino |first2=Michele |last3=Sibilio |first3=Maurizio |date=2019-04-30 |title=Disuffo: Design, prototyping, and development of an open-source educational robot |url=https://oaj.fupress.net/index.php/formare/article/view/3792 |journal=Form@re - Open Journal per la Formazione in Rete |language=it |volume=19 |issue=1 |pages=106–116 |doi=10.13128/FORMARE-24446|s2cid=181368197 }}</ref> to simplify making buggies and small robots. Others are electrically equivalent, but change the form factor, sometimes retaining compatibility with shields, sometimes not. Some variants use different processors, of varying compatibility.
 
In addition to hardware variations, [[open source]] libraries have been developed to support Arduino hardware in [[Electronic design automation|EDA]] tools. One such project provides [[KiCad]] schematic symbols and [[Printed circuit board|PCB]] footprints for Arduino modules, expansion boards, and connectors, making it easier for engineers to integrate Arduino into their designs. <ref>{{Cite web |title=KiCad Symbols and Footprint Library for Arduino Modules |url=https://boardor.com/blog/kicad-symbols-and-footprint-library-for-arduino-modules |access-date=2014-11-18 |website=boardor.com}}</ref>
 
 
===Official boards===
Line 146 ⟶ 149:
{{Infobox software
| name = Arduino IDE
| screenshot = Arduino-IDE-2x-Blink.png
| caption = Screenshot of Arduino IDE 2.x showing ''Blink'' code
| developer = Arduino Software
| latest release version = 2.3.2
Line 157 ⟶ 162:
}}
 
An initial alpha preview of a new Arduino IDE was released on October 18, 2019, as the Arduino Pro IDE. The beta preview was released on March 1, 2021, renamed IDE 2.0. On September 14, 2022, the Arduino IDE 2.0 was officially released as stable.<ref>{{Cite web |date=14 September 2022 |title=It's here: please welcome Arduino IDE 2.0 |url=https://blog.arduino.cc/2022/09/14/its-here-please-welcome-arduino-ide-2-0/ |access-date=12 November 2022}}</ref>
 
The system still uses Arduino CLI (Command Line Interface), but improvements include a more professional development environment and autocompletion support.<ref>{{Cite web |last=Williams |first=Al |date=21 October 2019 |title=The Arduino IDE Finally Grows Up |url=https://hackaday.com/2019/10/21/the-arduino-ide-finally-grows-up/ |access-date=26 October 2019 |website=Hackaday}}</ref> The application frontend is based on the [[Eclipse Theia]] Open Source IDE. Its main new features are:<ref>{{Cite web |last4=Faris |first4=Salmon |date=21 October 2019 |title=Introducing new Arduino Pro IDE with advanced features |url=https://www.seeedstudio.com/blog/2019/10/21/introducing-new-arduino-pro-ide-with-advanced-features/ |access-date=26 October 2019 |website=Seed Studio}}</ref>
Line 172 ⟶ 177:
One important feature Arduino IDE 2.0 provides is the debugging feature.<ref>{{Cite web |date=12 September 2024|title=Debugging Fundamentals|url=https://docs.arduino.cc/learn/microcontrollers/debugging/ |access-date=26 September 2024 |website=Arduino}}</ref> It allows users to single-step, insert breakpoints or view memory. Debugging requires a target chip with [[debug port]] and a debug probe. The official Arduino Zero board can be debugged out of the box. Other official Arduino SAMD21 boards require a separate SEGGER J-Link or Atmel-ICE.
 
For a 3rd party board, debugging in Arduino IDE 2.0 is also possible as long as such board supports GDB, OPENOCD and has a debug probe. Community has contributed debugging for ATMega328P based Arduino <ref>{{Cite web | date=9 September 2023 |title=Arduino Board Package to Debug Uno/ATmega328P with CH552 debugger in Arduino IDE 2.0.0 |url=https://github.com/DeqingSun/unoDebugTestPackage |access-date=26 September 2024 |website=Github}}</ref> or CH32 RiscVRISC-V Boardsboards,<ref>{{Cite web | date=28 February 2023 |title=add debug feature.|url=https://github.com/openwch/arduino_core_ch32/commit/959844e9eba655169430bf6686b2ba055823d1cd |access-date=26 September 2024 |website=Github}}</ref> etc.
 
===Sketch===
Line 185 ⟶ 190:
Most Arduino boards contain a [[light-emitting diode]] (LED) and a current-limiting resistor connected between pin 13 and ground, which is a convenient feature for many tests and program functions.<ref name="Blink Tutorial" /> A typical program used by beginners, akin to [[Hello, World!]], is "blink", which repeatedly blinks the on-board LED integrated into the Arduino board. This program uses the functions {{code|pinMode()}}, {{code|digitalWrite()}}, and {{code|delay()}}, which are provided by the internal libraries included in the IDE environment.<ref>{{Cite web |title=pinMode() - Arduino Reference |url=https://www.arduino.cc/reference/en/language/functions/digital-io/pinmode/ |website=www.arduino.cc}}</ref><ref>{{Cite web |title=digitalWrite() - Arduino Reference |url=https://www.arduino.cc/reference/en/language/functions/digital-io/digitalwrite/ |website=www.arduino.cc}}</ref><ref>{{Cite web |title=delay() - Arduino Reference |url=https://www.arduino.cc/reference/en/language/functions/time/delay/ |website=www.arduino.cc}}</ref> This program is usually loaded into a new Arduino board by the manufacturer.
 
<syntaxhighlight lang="arduino" style="font-size:10pt;">const int LED_PIN = 13; // Pin number attached to LED.
const int LED_PIN = 13; // Pin number attached to LED.
 
void setup() {
Line 197 ⟶ 201:
digitalWrite(LED_PIN, LOW); // Turn off the LED.
delay(1000); // Wait 1 second.
}</syntaxhighlight>'''Sweep example'''
 
Sweeping a servo with an Arduino means moving it back and forth across a specified range of motion. This is commonly done using the '''Servo''' library in Arduino. To sweep a servo with an Arduino, connect the '''servo's VCC (red wire) to 5V''', '''GND (black/brown) to GND''', and '''signal (yellow/white) to a PWM-capable pin (e.g., Pin 9)'''. Use the '''Servo''' library to control movement. The code below gradually moves the servo from 0° to 180° and back in a loop.<syntaxhighlight lang="arduino">
#include <Servo.h>
 
Servo myServo; // Create a Servo object
 
void setup() {
myServo.attach(9); // Attach servo to pin 9
}
 
void loop() {
for (int pos = 0; pos <= 180; pos++) { // Move from 0° to 180°
myServo.write(pos);
delay(15);
}
for (int pos = 180; pos >= 0; pos--) { // Move back from 180° to 0°
myServo.write(pos);
delay(15);
}
}
 
</syntaxhighlight>
 
Line 208 ⟶ 233:
There is also a threading tool, named Protothreads. Protothreads are described as "extremely lightweight stackless threads designed for severely memory constrained systems, such as small embedded systems or wireless sensor network nodes.<ref>{{Cite conference |last1=Dunkels |first1=A. |last2=Schmidt |first2=O. |last3=Voigt |first3=T. |year=2005 |title=Using Protothreads for Sensor Node Programming |url=http://urn.kb.se/resolve?urn=urn:nbn:se:mdh:diva-4058 |work=Proceedings of the REALWSN 2005 Workshop on Real-World Wireless Sensor Networks Presented at the REALWSN 2005 Workshop on Real-World Wireless Sensor Networks}}</ref>
 
There is a port of [[FreeRTOS]] for the Arduino.<ref>{{Cite web |title=FreeRTOS for Arduino |url=https://www.arduino.cc/reference/en/libraries/freertos/ |website=www.arduino.cc}}</ref> This is available from the Arduino Library Manager. It is compatible with a number of boards, including the Uno.
 
==Applications==
Line 222 ⟶ 247:
 
==Simulation==
* [[Tinkercad]], [[Tinkercad#Circuits|Circuits]] - an analog and digital simulator supporting Arduino Simulation, which is commonly used to create 3D models
 
==Recognitions==
Line 233 ⟶ 258:
* [[List of Arduino boards and compatible systems]]
* [[List of open-source hardware projects]]
* [[Calliope mini]]
* [[Micro_Bit|BBC micro:bit]]
* [[Raspberry Pi]]
 
== Explanatory notes ==
Line 291 ⟶ 319:
[[Category:Physical computing]]
[[Category:Italian inventions]]
[[Category:Software using the GNU AGPLAffero licenseGeneral Public License]]
[[Category:Free software programmed in TypeScript]]
[[Category:Free software programmed in JavaScript]]