Arduino 1.8.6 Library? - Page 1
Forum section: electronics / beginners

author: CaptDon
author_rank: Super Contributor
timestamp: November 20, 2024, 03:27:57 am
content: Maybe there is a better subgroup on this forum for this question, but here goes. I am running an old version of the Arduino app 1.8.6 which is the newest version to run on my old 32 bit Gateway ROG450 laptop. Is there a way to print the contents of the library? I am running the Nano module. Sadly, mine had the chinesium CH341 Comm chip and I had to jump through hoops to get a USB comm port to show up. The are lots of 'Examples' that you can load and run but I would like to see all of the 'commands' for lack of a better term that are available. I am a total newbie to this stuff and the Nano was given to me in trade for some other I.C.'s I had on hand. Thanks for any leads or links.

author: pqass
author_rank: Super Contributor
timestamp: November 20, 2024, 07:12:43 am
content: It appears that you're new to microcontrollers.QuoteYou're probably referencing the Arduino IDE version 1.8.6 archive (made for either Linux, Windows, or MacOS). This is a whole directory tree of files including: integrated development environment/editor, cross compiler tools, C/C++ source code for base functions and some optional libraries (supporting hardware such as LCDs, stepper motors, servos, WiFi, etc.).QuoteConsult the reference manual on what functions are available to call when writing your "sketch" (the C/C++ program to be uploaded to the microcontroller). See "Language Reference"here. Each optional library will have their own reference documentation (same link). Also see the "Variables" and "Structure" tabs (under "Language Reference") to get acquainted with the C Language parts andhereon how to upload your sketch to the Nano. You can also consult any C/C++ Language book/tutorial. Unfortunately, I haven't been able to find documentation on the avr-gcc Standard C and math libraries included (they're here: /arduino-1.6.8/hardware/tools/avr/avr/lib/libc.a and libm.a).QuoteIs a hardware implementation (board) containing a ATmega328 microcontroller (schematichere). There are many boards in the Arduino ecosystem. Seeherefor their current and past lineup. Their original, popular "UNO" board has an ATmega328 microcontroller from Atmel (now Microchip). The Nano is a smaller form-factor version of this. The newer boards may have faster, different processors with additional peripherals (eg. WiFi). The idea is that all boards can run basically the same sketch but with different references to pins or peripherals specific to the board the sketch is uploaded to.QuoteIt's likely not a genuine Arduino brand board. But that's okay. I would expect it to behave like a genuine Arduino Nano.Seek out Nano or UNO sketch examples/projects on the Internet.

author: pcprogrammer
author_rank: Super Contributor
timestamp: November 20, 2024, 07:51:09 am
content: You might want to look at Linux to install on your old laptop. There are still distro's for it and work with the CH340 or CH341 controllers out of the box. It maybe is even possible to build the version two IDE on it.But that is not your question, which is answered by qpass.The Arduino environment exists of many layers and are not so easy to browse through. As there are many target MCU's by now you can find directories specific for each of these MCU's, but there are also higher level libraries that work for all of these MCU's. One does have to be vigilant though, because not all of the libraries out there are behaving this way.As a beginner it is best to stick to the documentation provided by Arduino and given in the previous post. With the Arduino nano, real or clone, you have a safe target that will work with most of the stuff out of the box. There might be an issue with the boot loader being an old or new version, but that is solvable when you run into problems with that.Anyway, have fun with your new toy.

author: CaptDon
author_rank: Super Contributor
timestamp: November 20, 2024, 02:22:30 pm
content: Fortunately, I have dabbled in Dev-C++ and some older C releases so the C language is familiar to me. I am looking for the list of things like 'pinMode', 'analogWrite', 'digitalWrite', etc. The words or text that are Arduino based functions that aren't native to a person familiar with ANSI C. They show up in reddish brown in the sketches. What is the correct term for these? Functions? Commands? Macros? Sorry to seem so dumb. I will continue to browse the 'Examples' sketches for available functions (or whatever is the proper term). My forte in my hayday was machine code and assembly language for the 8080 / 8085 / Z-80 8 bit CPU's. I still get calls to patch code for old industrial machines that operate using these old devices. I do keep a stock of the 74XX and 74XXX stuff as well as the old 'helper' I.C.'s like UART's, PIA's, RIOT's and of course a pile of different EPROM's for plug and play updates and board repairs. Thanks mates!!! Lot's of great Elmers and Mentors here on EEVBLOG!!!

author: themadhippy
author_rank: Super Contributor
timestamp: November 20, 2024, 02:31:00 pm
content: Quotesomething like this?https://docs.arduino.cc/language-reference/

author: pcprogrammer
author_rank: Super Contributor
timestamp: November 20, 2024, 02:58:55 pm
content: Quote from: CaptDon on November 20, 2024, 02:22:30 pmIf your forte was (is) machine coding, you can easily do so on the AVR architecture based MCU on your nano.Everything about the chip can be found here:https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7810-Automotive-Microcontrollers-ATmega328P_Datasheet.pdfIt is also possible to program the thing with bare metal C. I do not know what compiler or assembler to use on Windows though, but under Linux there is the gnu compiler for it.A lot of the support chips you have still lying around have functional equivalents in the ATmega328P chip.The names you mentioned are either functions or macros depending how they have been implemented. The language reference provided by qpass and themadhippy shows them all. Be aware that pin naming can vary based on target board. The original board for the Arduino framework was the UNO, for as far as I'm aware, and the pin numbering is based on that one. The nano is the small version of it so the pins are the same, if not mistaken. I'm not a big user of the Arduino framework.Since the Arduino framework uses C++ you have for instance the object "Serial" which is a class that has several functions like serial.read() that allows you to get data from the serial buffer if there is any. Serial will be used in lots of examples.

author: awakephd
author_rank: Regular Contributor
timestamp: November 23, 2024, 04:16:51 pm
content: It seems to me that you are asking about the "standard Arduino library," not to be confused with standard C or C++ libraries. This library implements the various functions that we can take for granted when programming a device using the Arduino platform - functions such as digitalWrite or analogRead, and also classes such as HardwareSerial that are instantiated as the Serial object.On my Linux system, this library (or much of it) is found here:Code:myusername@mymachine:~/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino$ lsabi.cpp hooks.c Server.h wiring.cArduino.h IPAddress.cpp Stream.cpp wiring_digital.cbinary.h IPAddress.h Stream.h wiring_private.hCDC.cpp main.cpp Tone.cpp wiring_pulse.cClient.h new Udp.h wiring_pulse.SHardwareSerial0.cpp new.cpp USBAPI.h wiring_shift.cHardwareSerial1.cpp new.h USBCore.cpp WMath.cppHardwareSerial2.cpp PluggableUSB.cpp USBCore.h WString.cppHardwareSerial3.cpp PluggableUSB.h USBDesc.h WString.hHardwareSerial.cpp Printable.h WCharacter.hHardwareSerial.h Print.cpp WInterrupts.cHardwareSerial_private.h Print.h wiring_analog.cAs you can see, you have to dig deeply into the directory structure of the hidden directory where the IDE stores things. (It is hidden on my Linux system; on a Windows system, maybe it under the normally-hidden AppData directory?)Notice this sequence in the directory structure: .../packages/arduino/hardware/... - under packages you will find sub-directories for different board families. On my system, I see sub-directories for ATTiny and ESP8266, because I have downloaded those packages to be able to use the Arduino IDE with corresponding boards. The "arduino" package is the standard package that supports the typical Arduino boards (and their clones), such as the Nano.Once you dig down to the right sub-directory, you can poke around these files. You will find the definition of the digitalWrite function in the wiring_digital.c, for example.One other comment: on the 2.x version of the Arduino IDE, you can right-click on a function (such as digitalWrite), and one of the pop-up menu options it offers is to go to the definition - this will load that library file into the IDE so that you can examine it. I don't recall if that worked under 1.8.6, but give it a quick check to see ...