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
1
vote
1answer
2k views

Pass class's public function as an argument to external command

I am trying to write a library for encoders. main.ino: #include <./Encoders.h> Encoders encoders(); void setup(){ Serial.begin(9600); } void loop(){ Serial.print(""); ...
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/)...
14
votes
5answers
46k 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 ...
6
votes
1answer
2k views

Why do I need to include libraries used in other libraries?

I have a simple library which uses another library. Here is the header: #ifndef __DERIVEDCLASS_H__ #define __DERIVEDCLASS_H__ #include <HardwareSerial.h> class DerivedClass { private: ...
13
votes
7answers
15k views

Loading local libraries

I'm new to Arduino/C development (coming from a JavaScript/Ruby environment), but I was wondering if it was possible to include a library from a custom folder within a sketch? So this is my situation;...
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 ...
5
votes
1answer
14k views

ESP8266 & websockets

At the moment, I'm using various operating systems and devices like the Raspberry pi to control lights and other stuff over websockets. I use websockets since they added the support on Chrome. I write ...
4
votes
6answers
26k views

How to connect Wi-Fi shield ESP-12E-ESP8266-UART-WIFI-Wireless-Shield with Arduino

I have bought this shield from ebay and now I don't know how to use it, ESP 12E ESP8266 UART WIFI Wireless Shield for Arduino UNO R3 Bouclier Sans filfr: There are no instructions in the box or ...
6
votes
5answers
10k views

Alternatives to Wire library for I2C

I am looking for (reasonably easy to use and well tested) alternatives to the Wire library. Wire works very well, but: I only need the Arduino to act as I2C master and the Wire library seems to be a ...
7
votes
2answers
12k views

How does this code line detect if a serial interface is connected?

I am working with some code for remote temperature sensor nodes. They turn the debug interface on and off depending on if anything is conneced to the serial port or not. The code is on Github here. ...
5
votes
2answers
2k views

Can I switch from Arduino IDE to Atmel studio or Visual Micro but still use Arduino library?

If switch from Arduino IDE to Atmel studio or Visual Micro, how to use existing Arduino library? Library serves important function of 'packaging' real and complex hardware (like NRF24L01 radio board)...
11
votes
8answers
3k views

Where can I find a central repository of all available Arduino libraries?

Currently; when I start a new Arduino project with some new hardware, the first thing I do is to look for 3rd-party libraries that bring Arduino support for this hardware. The first places I look are:...
5
votes
3answers
1k views

Decoding IR codes with IR sensor rather than IR receiver module

I'm looking for a library to decode RAW IR signals from an IR sensor (looks like a black LED, two legged) rather than an IR module (3 legged, rated for a particular frequency - such as 38kHz). Is ...
5
votes
2answers
874 views

What are the FLASH_ARRAY/FLASH_TABLE macros in this code?

In this code for heating monitor, there appears to be macros called FLASH_ARRAY and FLASH_TABLE. I can't find any reference to them either in this code, Arduino, or on the Internet. What do they do? ...
2
votes
1answer
1k views

How to transmit string data using the rc-switch library?

I am using the rc-switch library for sending and receiving data. In rcswitch library, there is no method to send string data. I am using below method to send the string message in char buffer. ...
1
vote
1answer
101 views

RH_RF24_MAX_MESSAGE_LEN in RH_RF24.h

I use RH_RF24.h to control Si4463, and realize some simple communication between two Si4463 . But I don't know the mean of RH_RF24_MAX_MESSAGE_LEN in this example. RH_RF24_MAX_MESSAGE_LEN is a ...
1
vote
1answer
127 views

How to use setModemRegisters in RF24

The below picture is the introduction of setModemRegisters . First: What is the mean of ModemConfig* config? I mean: how to write the parameter. Maybe just give a example, and it will be better if it'...
1
vote
1answer
11k views

Arduino Uno Sensor DHT11 Failed to read from DHT sensor

I get this error every time. I used the DHT tester file from this library. Which gives me an error. And then I realized that in my code Arduino recognizes only the readTemperature function, not ...
0
votes
1answer
11k views

How to add .h file in library [duplicate]

I am trying to make an ultrasonic distance meter using Arduino. For this I added the ultrasonic library. But on compiling it shows this error "ultrasonic.h not available". Please tell me how to add ...
0
votes
3answers
19k 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
2k views

Using #define and multiple classes

I am using the FastLED library in my program and the basic usage is that the following lines go at the top of the main sketch: #include <FastLED.h> #define NUM_LEDS 60 #define DATA_PIN 6 You ...
0
votes
1answer
111 views

Trying to save .wav files with new name every loop

I have built a set up with an Arduino UNO hooked up to a switch, so that whenever the switch goes from HIGH to LOW it saves audio to an SD card. I am using the TMRpcm Library. The problem is the ...
0
votes
1answer
87 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
1answer
305 views

Speed of comunication by SI4463 under RH_RF24.h

As in this SO question, I use use a RH_RF24.h to control an SI4463. In RH_RF24, there is not anything about the speed of communication. I need the way to control the speed of communication. Because I ...
-3
votes
3answers
7k views

How do I initialize a servo object in my own library?

I'm trying to make my first library for Arduino and want to use a servo object in my library. How can I do this?