Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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
1answer
35 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
340 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
7k 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
111 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
20k 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
43 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
247 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
252 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
2k 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
2k 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
118 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
267 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
41 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
52 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
64 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
202 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
517 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
110 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
212 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
135 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
4k 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
70 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
392 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
45 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
385 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
4k 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
50 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
413 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
403 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
2k 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
303 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
347 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
37 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
556 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 ...
0
votes
2answers
1k views

DFPlayer library using RT TX pins

I am using the DFRobotDFPlayerMini-1.0.1 library by Angelo. I am trying to use the actual RX TX pins on a Uno R3, but it doesn't connect unless I type in an alternate digital pin number. This is no ...
0
votes
2answers
130 views

How to load page from SD card and still show live data from sensors?

I am just wondering, how can we display page from SD card and still show live data from sensors? I have web server running on Arduino mega using ethernet shield, in my sketch I am doing client.print ...
0
votes
1answer
870 views

Library, instantiation of a class object

I am python experienced, an arduino noob, and absolutely no experience of C other than what has been forced upon me by arduino use. I have just spent a day hammering google for the precise syntax of ...
0
votes
1answer
135 views

how to get an unofficial WiFi Shield to work?

I just bought these two WiFi Shields -> http://www.ebay.de/itm/262525969091?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT As they arrived I put one of them onto my Arduino Uno R3 and ...
0
votes
1answer
307 views

most effective ( progsize/speed ) SD card usage

I am making a project with several modules and libraries involved. I just tested the SD lib example, and got a binary at ~14KB - way too much. I'd like the SD bits to go below 8KB, since it's just ...
0
votes
1answer
451 views

Understanding the contents of a library in C

So this is a question not just about the #include but most all includes you find while programming in C. So I understand a library is prewritten code and when you include that library are you able ...
0
votes
1answer
523 views

Help with a rather specific implementation of FFT Library?

So, I guess what I'm trying to do here is properly understand the FFT library posted here by Open Music Labs, done in C++. I believe I understand the Fourier transform, but the FFT has some nuance ...
0
votes
2answers
2k views

Sending and receiving custom messages with Ardulink

I am sending custom code to Arduino with this ardulink command: { ArduinoControl.link.sendCustomMessage("oled"); } Code from standard Ardulink sketch CustomMessagesChipKit.ino: { if (...
0
votes
2answers
8k views

Pass a member function pointer to a method of a foreign class (EDB Lib)

I'm currently working on my own arduino library and I'm becoming exasperated with the following problem: I want to store data with the extended database library (https://code.google.com/p/arduino-edb/)...
0
votes
1answer
1k views

TinyGPS (Plus) Library

Is there a particular function in the library TinyGPS or TinyGPS Plus which outputs the raw NMEA sentences? I couldn't find anything about it on the website guide of the library.
0
votes
2answers
1k views

object with multiple instances with internal data store separate for each instance

I'm trying to keep track of a timer, and the internal variables seem to be overrun by one another. I just want two instances of the Output class, which can keep track of the _elapsed_time so I can ...
0
votes
2answers
263 views

Newbie needing help with debounce errors in arduino

So I found a code I would like to use and not sure how to edit the code properly. #include <Debounce.h> void matrix(char matrix[7]) { int map[10]; map[0] = 2; map[1] = 3; map[2] = 4; ...
0
votes
1answer
6k views

TCS3200 color sensor not reading with delay lower then 4000 ms using TimerOne.h

I'm trying to get the color sensor TCS3200 to give color values with a delay lower than 4000 ms. I've found a library to interface the TCS3200 from this link. I've modified the code to serve my ...