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
155 views

Library compilation error

Need help for this Tutorial. I tried to compile the code, but I'm getting compiling error. I tried to ask on that forum too but got no answer, the error is: In file included from C:\Program Files (...
0
votes
1answer
42 views

millis() function works with inline code and gives output but when creating own library it doesn't works

I am creating library for GPS to use in my project. I am using Adafruit GPS and its library to create my own library in which I am using millis() function to display the GPS Location after 1 minute (...
4
votes
2answers
85 views

How to document a custom library in Arduino

I have created my own library and it is working flawlessly. Now I want to add some documentation to it that the Arduino IDE can understand. For the functions from the Arduino IDE itself like delay(ms)...
0
votes
1answer
35 views

Creating an array with the length coming from a library

When creating an array like in the sketch #include <Lib.h> int myArray[Lib::len]; void setup() {} void loop() {} the variable len must be an integer constant that is known at compile time. ...
0
votes
1answer
30 views

Error: invalid application of 'sizeof' to incomplete type 'int []' when trying to compute the size of an array in a library

I have created a library that contains an array. This is the .h file: class Lib { public: static int arr[]; }; And this is the .cpp file: #include "Lib.h" int Lib::arr[] = {0, 1, 2, 3}; ...
-1
votes
0answers
42 views

Adding oled library stops sound from working?

my code is using keypad library and oled display and piezo element. Without the oled code added everything works just fine. as soon as I add code for that, sound stops working. doesn't even call the ...
0
votes
2answers
28 views

Including keypad library removes sound from my piezo element

I am using the keypad library to include keypad and input numbers. when a specific number is entered a sound must be made. However when I input using the serial monitor , sound is working. But when I ...
1
vote
2answers
1k views

How would I include Arduino libraries using AVR-gcc without the IDE?

I am writing my own code for the Arduino Uno. I compile my code with AVR-gcc, and then upload it with AVRdude. I am not using the Arduino software, but I do have it installed and working on my PC. I ...
1
vote
2answers
6k views

Exit status 1 expected primary-expression before ']' Arduino

Here's the whole error: Arduino: 1.6.7 (Windows 7), Board: "Arduino/Genuino Uno" *\readMifare\readMifare.ino: In function 'void loop()': readMifare:113: error: expected primary-expression before ...
0
votes
1answer
36 views

How to use existing (non-arduino-specific) library with subfolders in Arduino IDE?

I have a generic c++ library that i'd like to use in an arduino project without making changes to the library code. The library contains subfolders and files in the library include other files of the ...
1
vote
0answers
21 views

Use Arduino Libraries in PlatformIO?

I'd like to use Arduino libraries installed in C:\Users\Username\Documents\Arduino\libraries in a PlatformIO project. Is it possible? if so, how?
-2
votes
5answers
3k views

BH1750 Light sensor always giving output as 54612lx

urgently need some inputs, Connection: VCC-5v GND-GND SCL-SCL(analog pin 5) SDA-SDA(analog pin 4) ADD-NC or GND Code pasted below used library from GIT : https://github.com/claws/BH1750 #include &...
1
vote
2answers
7k views

Global variables use to much space in the dynamic memory

I use two simple libraries (see 1, 2) I found online for my code on the Arduino Uno, unfortunately I also use ROS and all those libraries take away to much space, when I compile my code I get this ...
0
votes
1answer
3k views

Arduino IDE: Board nodemcuv2 (platform esp8266, package esp8266) is unknown

I am receiving this error after reinstalling Arduino IDE (everything was working fine [same components, same code]): Board nodemcuv2 (platform esp8266, package esp8266) is unknown I have recently ...
0
votes
1answer
19 views

Calling functions from an array of pointers in a library causes 'undefined reference to' error

I am trying to create a library, where I have an array of pointers to functions in it. This array is used by other functions in the library. This is the code of the header file: class Lib { public: ...
1
vote
1answer
86 views

FastLED library: How can I adjust the brightness of a single pixel on an absolute scale?

I'm using the FastLED library to control a digital RGB LED strip. While this library seems very comprehensive in capability and ease of use, I do not yet see a way to simply set the brightness value ...
0
votes
0answers
162 views

Read SNMP OID values with Arduino

I wish to read SNMP predefined OID values from other devices, can it be done with Arduino? I searched all over the internet for the past 2 weeks about Arduino with SNMP and found a lot of great ...
0
votes
1answer
97 views

Unresolved reference to public function from library

I have three libraries that I've written and I'm trying to use. They're stored as follows Documents ├── Some/Path/To/Folder │ └── firmware.ino └── Arduino └── libraries ├── error ...
-1
votes
3answers
176 views

How to generate .a and .so files to add in arduino project

I know to make a library on arduino ide with source codes, but I cant send my source code to another users who want to use my lib. So I need to make a library with precompiled=true info at library....
1
vote
2answers
100 views

What is causing this warning in Arduino IDE?

I'm using DS3231 module with rinkydink library and it is working just fine, however every time i want to compile the code Arduino IDE shows this warning: C:\Program Files (x86)\Arduino\libraries\...
0
votes
1answer
138 views

Passing reference to hardware between methods in custom class

I'm a C++ / Arduino newbie, trying to build a custom library for the first time. I created a unit called CDSensors.cpp, which has two methods, SetupSensor and ReadSensors. The sensor is a SparkFun ...
0
votes
2answers
40 views

How to set “IPAddress ip” using a variable?

Created a "variableInput.h" file for editing variables in one place; instead of searching multiple lines of code, to find lines needing editing. // variableInput.h // // User defineable ...
0
votes
0answers
21 views

Check if the fingerprint exists and enroll with it? Adafruit_Fingerprint.h

I need to verify a fingerprint before being registered, but I have to put the finger 3 times on the finger sensor, which I prefer to do it just twice. The verification is ok, but I don't understand ...
14
votes
5answers
47k views

How can I get the source files for Arduino libraries?

I've been looking for a while inside Arduino's files to find the core library. However, I haven't found them yet. Where on my hard drive can I obtain the core library files (.cpp and .h) necessary for ...
0
votes
0answers
32 views

IRremote library not compiling for Sparkfun RedBoard Artemis

I have an IR Receiver hooked up to digital pin 10 on my Sparkfun RedBoard Artemis and I want to decode IR signals coming from a TV remote. I have the following code: #include <IRremote.h> int ...
2
votes
4answers
85 views

Why do most arduino function return a -1 instead of a 0

Many arduino functions return -1 if something 'fails'. Serial.read for example returns -1 or the infamous ÿ when this function is called while the serial buffer is empty. As embedded C progammer, I ...
0
votes
1answer
139 views

Wiring ESP8266 and PN532

I'm trying the Android Hce example in this PN532 library. I can't find how to set SDA and SCL address in the code, so I tried connecting them in CLK and SD0 pins. The serial monitor gives me "Didn't ...
3
votes
2answers
298 views

CC3000 Wifi: Enable Debug

How do I enable debugging using Adafruit CC3000? I am using the Adafruit_CC3000_Library. I've followed the WebClient.ino example sketch. I'm able to make 300 to 400 HTTP requests, but eventually ...
0
votes
0answers
37 views

Fonts/Org_01.h: No such file or directory

I have written one Arduino code for working with tft lcd 2.4 and in it i used <Fonts/Org_01.h> new font ,It was working in my Win8 OS but now in Linux OS i have installed new Arduino in my ...
0
votes
1answer
82 views

How to scale a bitmap (uint8_t array) in Arduino?

So I have a project where I send text to an Arduino, which is then printed out as a QR code on a thermal printer that can take a bitmap image with a given width and height. Is there a way I can "...
3
votes
4answers
4k views

Are there any detail examples of Si4463

Recently, I bought two Si4463 chips, but I don't know how to use them. It seems complex. I'd like to know if there are any examples of an Si4463 used with an Arduino?
0
votes
1answer
118 views

Trying to instantiate a DS3231 real time clock within a library

I'm trying to write a library encapsulating things that I do with a DS3231 real time clock. I have managed to compile a sketch using the library, but it apparently blows up when attempting to call ...
2
votes
1answer
274 views

FFT library for Arduino 101?

I am currently trying to get a real-time FFT working for a project on an Arduino 101 which uses the Intel Curie chip. All the FFT libraries (if any) seem to be for the Arduino Uno and architecture ...
0
votes
1answer
255 views

Error when HX711_Arduino_Library installed

First I'm getting this error #include no such directory. Then HX711_Arduino_Library installed. Now getting following errors: Arduino: 1.8.9 (Windows 7), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, ...
0
votes
0answers
63 views

Using a 122x32 LCD display with u8g2

I recovered a 122x32 graphic LCD display, its reference is NMTB-S000087FYHSAY-04. Here are some pics It was retrieved from a completely rusted object, but the screen seems to work. It is a 122x32 ...
0
votes
1answer
38 views

SPIMemory does not write always correctly

I'm using a WinBond 25Q128FVIQ (Flash 128 mbit, 3.3V) in combination with the Marzogh SpiMemory library on my Arduino Nano (also 3.3V). After using the default example, I found out what was read, did ...
0
votes
1answer
1k views

Arduino force feedback vibration gamepad

I'm projecting a gamepad with Arduino Micro. I'm using the Arduino Joystick Library. I'm building this gamepad for racing games so I need to catch signal like hit_the_wall, hit_another_car. I wonder ...
1
vote
1answer
436 views

Looking for light-weight Arduino OLED library that supports text and bitmaps

I'm trying to incorporate a screen into my Arduino code which is quite large already. The Adafruit SSD1306 library is overly large and has a lot of unnecessary things in it. I've found the ...
0
votes
1answer
72 views

Error: “'lcd' does not name a type” using LiquidCrystal library

I'm following an online Arduino tutorial/course and trying to make a simple moving character on an LCD screen, but for some reason I get the following error: "error: 'lcd' does not name a type". I'm ...
0
votes
0answers
155 views

How to attach interrupt to RBDlibrary?

I am pretty new to arduino programming. I want to use the library from the Robotdyn dimmer modul with a arduino uno and a encoder with lcd for a menü but if i attach the interrupt for the encoder (on ...
0
votes
2answers
52 views

Tian stops working after some hours

I'm having a very strange problem. I have a Tian that is programmed to send out sensor data to a server every x seconds. My program run well but after 14,15 hours of operation it stops working and I ...
0
votes
1answer
201 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
0answers
105 views

Using the Broadcom AFBR-S50 with Arduino

I'm trying to interface with a Broadcom AFBR-S50MV85G ToF sensor over SPI using an Arduino, which is complicated by the fact that the provided library and reference application is written for Cortex ...
0
votes
1answer
183 views

Installing Jan Breuers SCPI Parser

I am trying to install/include Jan Breuer's SCPI parser. I was not able to find any documentation to accomplish this. I copied the contents on of the GIT zip file to my Libraries directory, but when I ...
0
votes
1answer
53 views

Bypass a function error

I have a long code written in Arduino101 that works fine. I use a prepared function (connected to a library) in my code that I have not written it. My input to this function is an array. In 99.9999..% ...
0
votes
2answers
205 views

ESP12E Soft WDT reset stack trace leads to libraries

Im using ESP12E DevKit v2 (esp8266 wifi module) board for controlling relays and displaying DHT22 temp,humidity on web server. It runs smoothly when the web client is closed but when i leave the ...
0
votes
1answer
51 views

Modular Coding - What types of code portions to convert into library files? Rationale and methods?

I'm working on documentation and combining 2 pieces of code for testing parts of a larger project. I'm supposed to comment and make the code very clear to people who will use it later and make sure ...
0
votes
0answers
55 views

src folder in sketch structure and include library from subfolder

My Arduino/PlatformIO libraries folder libraries └── cleaner_robot └── TB6612_Dual ├── tb6612_dual.h └── tb6612_dual.cpp I used this code to innclude it: #include <...
1
vote
2answers
67 views

Is it necessary to reduce the size of libraries?

For example RTClib library have codes for DS1307, DS3231, PCF8523 and softRTC. but I'm only using DS3231 and don't need the extra codes there to occupy my Arduino flash memory. Does Arduino IDE only "...
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 ...