Questions tagged [library]

A library is a file that can be included into the code to add new instructions by combining many existing instructions and creating one easy to use instruction to call.

Filter by
Sorted by
Tagged with
0
votes
2answers
229 views

displaying a 3 digit clock time on a 4 digit 7 segment display

I purchased one of these 4 digit 7 segment displays using a TM1637. I installed the TM1637 display library from the libraries manager and included it: (#include <TM1637Display.h>). I am ...
0
votes
3answers
359 views

What is the meaning of the preceding character on several library defines?

I have been reviewing the code for several libraries,mostly by SparkFun, and looking at the defines for for instance the chip select pins for their hardware. In the defines, rather than being a ...
0
votes
2answers
1k views

Are there any constants for default SPI port pins defined?

I'm writing a library which controls a device using SPI bus. For the communication I need to manually toggle the chip select pin. On most Arduinos SS pin is on D10, but there are also other models ...
0
votes
1answer
1k views

Updating MAX7456 library to work with Arduino 1.6.6

I've got this library for communicating with the MAX7456 chip. The library is abandoned and the only one I found that actually works, so I'd really like to use it. It compiles fine with Arduino IDE ...
0
votes
1answer
196 views

How to share a library on Arduino Playground?

I have written an ISR-based timer library for Arduino Uno and I would like to share it on the website and get it reviewed. But I am stuck on how to post it to playground.
0
votes
2answers
44 views

Unable to declare variable in a library that doesn't have a class: multiple definition of the variable

I have created a library Lib that doesn't have a class. I want this library to have a variable that can be accessed from outside. The way I would go about this is to just declare them in the header ...
0
votes
1answer
38 views

Higher precision logarithms

I need to produce a log to base 10 with at least 4 decimal places. However, the log10 inbuilt function is giving the output with only two decimal places. What do I do? Is there a different function or ...
0
votes
2answers
389 views

sizeof() on custom library constructor returns wrong result

I made a custom library (let's call it DigitalOutput.h) to learn a bit about librairies and to simplify my work. Here is the basic constructor in the .h file: DigitalOutput(uint8_t pin); Here is ...
0
votes
2answers
9k views

Setting a pointer to NULL in Arduino library - error: ‘NULL’ was not declared in this scope

I am writing my own library for using with my Arduino. In my code, if I set a pointer I have declared to NULL, such as int *ptr=NULL; I get the error error: ‘NULL’ was not declared in this scope I ...
0
votes
1answer
125 views

do i need to also connect GND and 3.3v

I am trying to run this code: https://github.com/miguelbalboa/rfid/blob/master/examples/ReadNUID/ReadNUID.ino Using an ESP8266 based D1 board and an RFID-RC522. I am not able to get it to detect the ...
0
votes
3answers
21k views

Error: Function not declared in the scope

I want to make a timer library. The cpp file I have written is: #include "avr/interrupt.h" #include "Arduino.h" #include "AllTimer.h" AllTimer::AllTimer() {} void AllTimer::dofun(void) { TIFR1 ...
0
votes
1answer
4k views

error: ‘sleep’ was not declared in this scope

I am trying to use the sleep function in lieu of delay(), but when I include sleep(), I get Sweep.cpp:60:10: error: ‘sleep’ was not declared in this scope I read some place, about #include <avr/...
0
votes
2answers
46 views

TimerOne Hanging

For the following program. Compiles and runs. I start the Serial Monitor (shown following code) and it asks me to input the Blink Rate. This runs in setup. Then it enters the loop and prints to the ...
0
votes
2answers
57 views

Questions about HMC5883L library

I'm studying the structures of libraries currently. I want to learn how good programmers write code, what are the strategies they follow, the art the programmer followed to develop the library. And ...
0
votes
1answer
539 views

exit status 1 - expected primary-expression before '(' token

When I try to compile the following sketch, the compiler returns the error "exit status 1 - expected primary-expression before '(' token", and highlights "midi();" in my code. Here is my sketch: #...
0
votes
3answers
389 views

Creating a library for arduino

I found a really nice 24 bit I2C adc which was fairly cheap as well (ADS1219) but as far as I could tell there are no libraries for it so I decided to make my own. I have managed to write functions ...
0
votes
1answer
3k views

Save a fingerprint to the database of the fingerprint sensor

I'm using the Adafruit Kookye fingerprint module in my project. Since it can only allocate 256 fingerprints I need to make a program to free the memory and add additional users. I have made the ...
0
votes
2answers
3k views

“avr/io.h: No such file or directory” while compiling for board Generic STM32F103C series

I'm trying to compile FastLED library for my STM32F103C using Arduino 1.8.5 IDE, but getting this error: In file included from C:\Program Files (x86)\Arduino\libraries\FastLED/led_sysdefs.h:32:0, ...
0
votes
1answer
135 views

Understanding SevSeg

I need to write a library for a display I created with eight segments. So, I decided to try to use SevSeg (https://github.com/DeanIsMe/SevSeg) as a starting off point. It can't be that different, ...
0
votes
3answers
2k views

Adafruit DHT22 Library + Arduino Due not compiling?

i recently purchased a DHT22's and tried to get it to work using Adafruit's DHT library on Github. When i compile it with a Arduino DUE, it gives me the following error: C:\Users\Moz\Documents\...
0
votes
1answer
270 views

MHz Sampling Rate for Arduino

How can we increase the Arduino's ADC sampling rate to 1 MHz while maintaining a 10 bit resolution? Can we change the prescaler to 16 to get 1 MHz ADC clock? If not, what alternatives are there? ...
0
votes
2answers
4k views

AttachInterrupt in a library

I'm having trouble adding attachInterrupt in a library that I am creating. I researched a lot, and I noticed that this is a common mistake, but do not quite understand the answers I found. The error ...
0
votes
1answer
49 views

Passing a NeoPixel object reference to a custom library

I'm new to Arduino programming and haven't programmed in C++ in the past. I'm trying to create a custom library to cycle a rainbow on my NeoPixel LED strip. I want to pass a reference or pointer or ...
0
votes
1answer
214 views

Error compiling for Arduino Nano 33 BLE with LiquidCrystal library

I recently started coding in the Arduino IDE for the Arduino Nano 33 BLE I bought. When I choose the Nano 33 BLE as my board, I get the following Error: Arduino: 1.8.11 (Windows 10), Board: "Arduino ...
0
votes
1answer
87 views

How should I customize UIPEthernet constants?

I am using UIPEthernet to get an Arduino Nano to drive an ENC28J60 Ethernet Shield for a UDP-based application. I'm customizing a number of its #define parameters to change default settings to save ...
0
votes
2answers
59 views

How do I segment Arduino program when line count is so large that code maintenance is difficult?

I'm looking for the Arduino/C++ equivalent of COBOL's 'copy' statement. I'm working on a program that is approaching 600 lines of code in the TopLevel.cpp source file. This is hard to manage ...
0
votes
1answer
49 views

Is there a simple HTTP(S) library that doesn't rely on WiFi?

I'm trying to implement a Mobile Network (only) for the ESP32 using Arduino IDE. So to be able to connect to website up/download files etc. I need to be able to handle various HTTP PUT/GET/POST ...
0
votes
1answer
1k views

Include guards vs #pragma once [closed]

Is there any particular reason why #pragma once doesn't seem to be used in Arduino code? Is this just because it's not a well-known feature, or is there some overriding reason to use #ifndef XXX_H/#...
0
votes
1answer
61 views

Invoke a method in the main sketch from within a library

I need to use a specific library that issues error messages in the form of String texts. The library uses the Serial.println() function to send the messages to the Arduino IDE's serial monitor. The ...
0
votes
1answer
91 views

Parsing array of an object in a library constructor

I am trying to develop an Arduino library that consists out of two classes. I want 'WayPointStack' to store an array of 'WPCommand', but I can't get it to work. WayPointStack.h #ifndef ...
0
votes
1answer
394 views

Not able to find right library for MPU9250

I am using an Arduino Uno and learning to use the motion sensor. Currently I was not able to find the library which looks simple and would like to get your suggestion. I found this https://github.com/...
0
votes
1answer
537 views

DFPlayer for Writing to SD Card

Can you use the DFPlayer to write to the SD card? Link for DFPlayer: https://www.dfrobot.com/wiki/index.php/DFPlayer_Mini_SKU:DFR0299 Here's the goal of my project. I have a button that, when pressed,...
0
votes
1answer
2k views

No matching function call for timer?

I am using the Timer library here with the Adafruit feather m0: https://github.com/JChristensen/Timer https://playground.arduino.cc/code/timer I cannot figure out why I am getting the error: no ...
0
votes
2answers
229 views

ESP8266 library: 2 requests received instead of 1

I have a strange issue with my sketch using WiFiEsp.h library from https://github.com/bportaluri/WiFiEsp When i send 1 request to my ESP8266 from my browser as http://192.168.0.25 , it seems that my ...
0
votes
1answer
484 views

Arduino IDE does not display examples folder from my custom library

I have created a custom library for local usage. I call is ABC_node for ESP32 and the structure is as follows: . |-- examples | |-- bnoCalibStorage | | `-- bnoCalibStorage.ino | |-- ...
0
votes
1answer
205 views

Apply patch to library for custom changes in Arduino IDE

I wish to obtain unix epoch timestamps in millisecond precision. I am using an ESP32 along with DS3231 RTC breakout board from adafruit. Apparently the Repository is not maintained often but I see a ...
0
votes
1answer
7k views

Specified folder/zip file does not contain a valid library

I am trying to use this library. But when I try to import the .zip file (of the directory) downloaded from GitHub, Arduino IDE says "Specified folder/zip file does not contain a valid library"
0
votes
1answer
93 views

CMDmessenger library

I am trying to use the CMDmessanger library on my Arduino uno, and am facing an issue. My issue starts right from the ArduinoController.ino example. When i send the frequency command 3,1; The led ...
0
votes
1answer
554 views

Is DateTime from RTClib giving garbage dates/times?

The RTC is working fine, but I'm having trouble with the DateTime class. Based on the following test, it seems like its math is wrong. #include <RTRlib.h> void loop() { auto ts = TimeSpan(0,...
0
votes
1answer
48 views

adafruit LSM9DS0 Library - ok with Uno but compile error with LinkitOne?

I'm calling an adafruit Flora LSM9DS0 magnetometer using the Adafruit library with the following sketch: #include <Wire.h> #include <SPI.h> #include <...
0
votes
1answer
453 views

Import library in Arduino IDE

I'm trying to use an HX711 load cell amplifier with my NodeMCU 0.9. I've found this library on Github and, following this guide, I tried to use it. Unfortunately I keep getting this error: sketch/...
0
votes
1answer
5k views

SSD1306 / U8glib display fonts and commands

I cannot seem to find any reference for the SSD 1306 or U8glib display font library or any command reference, like all the options for display() etc. For my fonts I been going into the utility folder ...
0
votes
1answer
66 views

Arduino library creation - Calling library and Merging

I am new to creating a library in Arduino. I was able to create a library from YouTube. I want to merge two other libraries into the library I created. Can you please help me to do so? I already ...
0
votes
1answer
448 views

Arduino with ATmega32U4 low power but keep Serial1 working

I am looking for a low power solution for my ATmega32U4. It uses Serial1 to communicate with Bluetooth, so I need to have it active. When I receive data from Serial1, I want to power up the Arduino, ...
0
votes
2answers
523 views

How to use #define in a library I'm trying to write?

I have written simple code to enable toggling of serial.print debug data. #define DEBUG #ifdef DEBUG #define DEBUG3(x,y,z) Serial.print(x);Serial.print(" ");Serial.print(y); Serial....
0
votes
1answer
3k views

How to load Image in Arduino?

In my recent project, I want to load Image in my Arduino. Is there any library available that can be used for loading Image in Arduino. Give some suggestion. Thank you!
0
votes
2answers
348 views

Error trying to compile an example from newly added Arduino menu library

I added the ArduinoMenu library https://github.com/neu-rah/ArduinoMenu and when I try to compile one of the examples, I get following error. Using library LiquidCrystal at version 1.0.5 in folder: ...
0
votes
2answers
415 views

I'm facing a problem with cap sense proximity

I've made use of the cap sense library in Arduino to make a touch less piano. I went according to my design and tried it out. Even after using a 10M ohm resistor, my program is only responding when I'...
0
votes
2answers
38 views

Need clarification with arduino syntax

I've been learning how to program this fine piece of equipment but i seem stuck. I came upon the "Knight rider" example where you are supposed to blink LED's from one side to another and i can't ...
0
votes
1answer
713 views

How do I “conditionally” include libraries and declare global objects of them?

I'm trying to write a generic "Test Bench" type of sketch using booleans to indicate whether or not to include specific libraries. After those are defined, I'm attempting to use preprocessor #if ...

1
3 4
5
6 7
9