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.

learn more… | top users | synonyms

1
vote
2answers
20 views

Convert library from using bitbanging to hardware SPI

I'm using a MCP3008 8ch 10bit ADC to expand the Analog Inputs for the project I'm working on. The only library I can find for it is here the library is ported from Adafruit's Raspberry Pi library ...
4
votes
2answers
69 views

Why does DHT-library (and others) only allow one object instance?

I came across the problem to handle two DHT22 devices. I use the Adafruit DHT Sensor library. Since my Arduino sketch works as a "relay" for Serial commands on a host, I tried to wire up and ...
1
vote
1answer
31 views

Can the Arduino Eclipse plugin use the Arduino IDE's libraries?

In Arduino Eclipse (v3, nightly build) I have not been able to load 'foreign' libraries, those written by me or someone else, so they are not among the available choices in the include-library ...
3
votes
3answers
28 views

How to define a SoftwareSerial object inside a class?

I have a header file called Rhino.h with class Rhino. I want to pass RX and TX pin numbers to this object class, and with this, define a SoftwareSerial object to be used inside the Rhino class. The ...
0
votes
1answer
17 views

VirtualWire send function

I am a little confused on how exactly VirtualWire's "send" function works. After looking at the code, the process I gathered is the following. In the Arduino IDE, call vw_send() with the right ...
1
vote
1answer
49 views

Cannot include .h files back one directory

I am working on a project with multiple arduinos. I want my folder structure to be as follows: / libs/ someSharedFile.h arduino1/ arduino1.ino arduino2/ arduino2.ino When I ...
0
votes
1answer
24 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
39 views

Instantiating bounce library inside a class

I am trying to get my head around how to instantiate objects from existing libaries inside a class object. Specifically I am trying to get the bounce2.h debouncer working. At the moment my code ...
0
votes
1answer
26 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 ...
1
vote
1answer
29 views

Can't compile my library because “String does not name a type”

I am writing a small library to move some code out of the arduino sketch and make it reusable. Problem is that it does not compile since "String does not name a type". This is my code (reduced): ...
0
votes
1answer
19 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
27 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 ...
1
vote
0answers
49 views

Receiving and transmitting messages simultaneously

tldr; I am writing a mesh network software using arduinos. I need to wirelessly receive, process, and transmit data, all simultaneously. I am aware of protothreads library, and the other software ...
0
votes
3answers
69 views

Use only one pin as serial output/input with arduino

I'm looking for a way to use Arduino UNO's as serial outputs or input "individually", I don want to have an RX pin for each TX pin. I know the library SoftwareSerial, but I'm not sure if it is posible ...
0
votes
2answers
111 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 ...
1
vote
0answers
16 views

Adafruit Trinket 3v with LED matrix backpack producing error

I have been wanting to create a Arduino watch. I built the circuit with an Adafruit Trinket 3v and an Adafruit LED matrix backpack (8*8). When I try to upload this example code: ...
1
vote
1answer
28 views

Defining object

I am trying to hide libraries behind another, for simplicity. But I can't deal with the objects required by the libraries. Basically I want to use the objects both in my .cpp and .ino file, but I am ...
0
votes
1answer
45 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(""); ...
2
votes
0answers
38 views

Arduino Mega And L298N Motor Driver Board (Controlling using AccelStepper Library)

Can someone help me how to use AccelStepper library in setting the origin position of the stepper? We are using a tact switch and an L298N driver for the stepper motor in setting the origin of the ...
1
vote
2answers
56 views

Help Understanding FFT Analysis and analogRead()?

Here's the deal, I'm attempting to learn how to use an FFT (Fast Fourier Transformation) Library for sound analysis (link is here). My issue is that this comes with included C++ code to show users how ...
1
vote
2answers
73 views

Override #define statements in libraries

I'm using a library that, by default, wants to use Serial2 as the interface to a display, however, I'm working with an UNO which only has one serial interface, so the compile fails. I'm trying to use ...
0
votes
1answer
23 views

Is Teensy compatible with the Arduino keyboard library?

I am thinking about buying some Teensy micro-controllers, but I want to know if the teensy are compatible with the arduino keyboard library.
0
votes
2answers
62 views

How to avoid delays in the loop() function?

vI have this functions in my loop() and it publishes temperature reading to Ubidots(an IoT cloud service) using the #include library but it seems it returns a boolean and so the loop is delayed until ...
0
votes
0answers
33 views

Is there a lean or modular SD library?

I'm using the SD library to perform two simple tasks. reading a configuration file writing a logfile I don't want to use subdirectories and can live with only two filenames. However, after ...
1
vote
0answers
37 views

Does anyone know a library that can emulate 3 throttles?

There is this library, but it emulates only one throttle and one rudder. The X Y Z axis don't work because they are addressed from -127 to 127 and I need 0 to 255. I just need one more throttle axis. ...
0
votes
1answer
27 views

Basic usage of Nick Gammon's Regexp library

I am using the following code modified from the examples. I get the count of matches but the actual value is not displayed #include <Regexp.h> void setup() { Serial.begin(115200); ...
3
votes
1answer
555 views

WARNING: Category '' in library *any library* is not valid. Setting to 'Uncategorized'

I'm using Ubuntu 14.04 with arduino Galileo and the newest arduino IDE from arduino.cc and every time I compile I got this warnings with any library in place of EEPROM, SD, Wire, Wifi and a lot of ...
0
votes
0answers
98 views

Software Serial library not working in Arduino

In an Arduino project I am not able to compile some code that uses the SoftwareSerial library. I get the following compilation errors. How do I correct the code? C:\Program Files ...
4
votes
1answer
79 views

Creating a library for attiny85 out of working program

Apologies if this is the wrong sub-forum, the involvement of ATTiny and arduino places this into a strange category. Please correct me if I should post elsewhere. It is important for this to be a ...
0
votes
0answers
16 views

How to drive a 4bit GLCD?

i've got a huge (about 6 x 23 cm) graphics LCD. I used my multimeter and the datasheet the LCD driver chips (6 x KS0104 and 2 x KS0103) to get the pinout. It has the following pins: GND, M, FCS (not ...
0
votes
1answer
140 views

NTP Client Library. Set sync provider pointing to public class function. Possible?

I am trying to develop a NTP client library for ESP8266/Arduino to make adding NTP sync an easier task. Basically, I've thought about a constructor as NTPClient(String host, int interval); and a ...
0
votes
0answers
62 views

How to add .h file to ino

I'm using the arduino along with a Raspberry pi. For this, I'm using ino to compile sketches through the command line. I now want to use the adafruit motor shield along with my arduino. This requires ...
0
votes
1answer
27 views

Can I increase the 10 event limit in Simon Monk's Timer library?

On Dr. Monk's library page here, he states: "You can attach up to 10 events to a timer." I am wondering if this is a hardware limit, or if it was an arbitrary number he chose for his library. In ...
0
votes
1answer
106 views

Migrating from ATMega2560 to ARM based — Teensy vs Due?

I currently have a project that is working on an AtMega2560 platform (heavily derived off the Arduino Mega). It mainly involves a GPS module and SD card. Going forward I am looking to add a few more ...
0
votes
2answers
45 views

How to install a library for a single project

How do you install an Arduino library so it's only available for a specific project? Say I have a codebase located at /myproject, and I want to install libraries at /myproject/lib/somelib. I can't ...
1
vote
2answers
345 views

Problems with Draw Loop using u8glib

I am using an Arduino Mega and a 12864ZW LCD with the u8glib library and the following code to draw to the LCD: U8GLIB_ST7920_128X64 Display(LCD_E_PIN, LCD_RW_PIN, LCD_RS_PIN, U8G_PIN_NONE); void ...
0
votes
0answers
22 views

Modbus loopback test

I am using Simplemodbus library with arduino Uno board. I have used below code with 5 device with different slave ID. The Indivually these slaves are working fine. Now I am trying to connect it in ...
0
votes
2answers
261 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 ...
1
vote
1answer
109 views

Why can't I include a library in another one?

I am trying to create a new library that uses another existing library. The original library declares a way to create an object called Multiserial that can be created in the main file and the program ...
0
votes
2answers
94 views

Serial Communication Problem Using Eclipse

Please help I have created an Arduino program that will switch the pins when I send a char. It works fine with serial monitor, but the problems come when I send chars with Eclipse using RXTX serial ...
3
votes
1answer
2k 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 ...
1
vote
2answers
41 views

Is it possible to package a sketch with dependent libraries for cross-platform compatibility?

I have a complex sketch that I spent many weeks working on, which I am backing up frequently because I'm afraid of losing any of my progress. I'm wondering if it's common practice to make a ...
0
votes
1answer
57 views

Find which WiFi device quiries a network?

1) What additional hardware sensors will be required for it? 2) What software components one shall develop to capture devices broadcasted network names? Looking at WiFi library can not get what one ...
0
votes
1answer
34 views

Using a library of sleeping with a combination of the WD and a physical INTERRUPT

I would like to use one of the nice libraries like : JEELIB ENERLIB SLEEP_N0M1 NARCOLEPTIC ADAFRUITSLEEPY_DOG LOW_POWER_MASTER But to use a X second interval of sleeping and in the same ...
1
vote
0answers
45 views

Teensy and MS5803 sensor

I'm trying to use the MS5803 pressure sensor with a Teensy 3.2. Compiling the Sparkfun, or other, libraries, however, results in no output. Can you provide guidance on how to modify the libraries to ...
1
vote
1answer
106 views

Can I access individual pixels on my 16x2 LCD display

I have a generic 16x2 LCD display connected to my Arduino. I can use the standard LCD library to display characters, but are there way to turn on and of individual pixels?
0
votes
1answer
30 views

Problem assign float to an embed class within the Linked-list libary

I have successfully implemented some code which uses a linked-list. Everything is working, except assigning a value to a float within the embeded class. When I run the code below, I get the expected ...
0
votes
0answers
70 views

Is there any way to import libcoap into Arduino project?

I am currently playing with libcoap (https://libcoap.net) client-server architecture. I need directions importing libcoap into Arduino project. Or any other way to implement CoAP (constrained ...
0
votes
0answers
68 views

Modbus RS485 Comms Export Meter

I am attempting to communicate with an ABB electrical export meter with an Arduino Mega2560. I am using the SimpleModbusMaster library as found here : ...
-1
votes
3answers
227 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 ...