Coder Social home page Coder Social logo

arduino_sensorkit's Introduction

Arduino SensorKit Library

Check Arduino status Compile Examples status Spell Check status

This documentation contains information about the classes and the usage of Arduino_SensorKit library which is primarily used in the Arduino Sensor Kit. This library is a wrapper for other libraries such as

The Arduino_SensorKit Library can be downloaded from the Arduino IDE's library manager or from the GitHub repository.

arduino_sensorkit's People

Contributors

aentinger avatar alranel avatar dependabot[bot] avatar hannes7eicher avatar karlsoderby avatar leiendeckerlu avatar lenardgeorge avatar marcmerlin avatar marqdevx avatar noppatoppa avatar per1234 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arduino_sensorkit's Issues

Compatibility of Sensor kit library with Arduino Nano RP2040 connect

When I compile using the Sensorkit for mbed_nano architecture (Arduino Rp2040 Connect board) I get the following warning and error messages:

library Arduino_Sensorkit claims to run on avr architecture(s) and may be incompatible with your current board which runs on mbed_nano architecture(s)
...
Compiling library "Grove-3-Axis-Digital-Accelerometer-2g-to-16g-LIS3DHTR"
/Users/peterbendel/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -c -w -g3 -nostdlib @/Users/peterbendel/Library/Arduino15/packages/arduino/hardware/mbed_nano/2.6.1/variants/NANO_RP2040_CONNECT/defines.txt @/Users/peterbendel/Library/Arduino15/packages/arduino/hardware/mbed_nano/2.6.1/variants/NANO_RP2040_CONNECT/cxxflags.txt -DARDUINO_ARCH_RP2040 -MMD -mcpu=cortex-m0plus -DARDUINO=10607 -DARDUINO_NANO_RP2040_CONNECT -DARDUINO_ARCH_MBED_NANO -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=0 -I/Users/peterbendel/Library/Arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino -I/Users/peterbendel/Library/Arduino15/packages/arduino/hardware/mbed_nano/2.6.1/variants/NANO_RP2040_CONNECT -I/Users/peterbendel/Documents/Arduino/libraries/Arduino_Sensorkit/src -I/Users/peterbendel/Library/Arduino15/packages/arduino/hardware/mbed_nano/2.6.1/libraries/Wire -I/Users/peterbendel/Documents/Arduino/libraries/Grove_-_Barometer_Sensor_BMP280 -I/Users/peterbendel/Documents/Arduino/libraries/Grove-3-Axis-Digital-Accelerometer-2g-to-16g-LIS3DHTR/src -I/Users/peterbendel/Library/Arduino15/packages/arduino/hardware/mbed_nano/2.6.1/libraries/SPI -I/Users/peterbendel/Documents/Arduino/libraries/Grove_Temperature_And_Humidity_Sensor-master -I/Users/peterbendel/Documents/Arduino/libraries/U8g2/src -I/Users/peterbendel/Library/Arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/api/deprecated -I/Users/peterbendel/Library/Arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino/api/deprecated-avr-comp -iprefix/Users/peterbendel/Library/Arduino15/packages/arduino/hardware/mbed_nano/2.6.1/cores/arduino @/Users/peterbendel/Library/Arduino15/packages/arduino/hardware/mbed_nano/2.6.1/variants/NANO_RP2040_CONNECT/includes.txt /Users/peterbendel/Documents/Arduino/libraries/Grove-3-Axis-Digital-Accelerometer-2g-to-16g-LIS3DHTR/src/LIS3DHTR.cpp -o /private/var/folders/97/6vhtgg3s5z3frxr6g2c4x8s00000gn/T/arduino-sketch-CDAB3820DEAA2C5841572D5994559EDF/libraries/Grove-3-Axis-Digital-Accelerometer-2g-to-16g-LIS3DHTR/LIS3DHTR.cpp.o
/Users/peterbendel/Documents/Arduino/libraries/Grove-3-Axis-Digital-Accelerometer-2g-to-16g-LIS3DHTR/src/LIS3DHTR.cpp: In member function 'void LIS3DHTR<T>::begin(arduino::SPIClass&, uint8_t)':
/Users/peterbendel/Documents/Arduino/libraries/Grove-3-Axis-Digital-Accelerometer-2g-to-16g-LIS3DHTR/src/LIS3DHTR.cpp:49:15: error: 'arduino::SPIClass {aka class arduino::HardwareSPI}' has no member named 'setClockDivider'
     _spi_com->setClockDivider(SPI_CLOCK_DIV4);
               ^~~~~~~~~~~~~~~
/Users/peterbendel/Documents/Arduino/libraries/Grove-3-Axis-Digital-Accelerometer-2g-to-16g-LIS3DHTR/src/LIS3DHTR.cpp:49:31: error: 'SPI_CLOCK_DIV4' was not declared in this scope
     _spi_com->setClockDivider(SPI_CLOCK_DIV4);
                               ^~~~~~~~~~~~~~
/Users/peterbendel/Documents/Arduino/libraries/Grove-3-Axis-Digital-Accelerometer-2g-to-16g-LIS3DHTR/src/LIS3DHTR.cpp:49:31: note: suggested alternative: 'SPI_CPOL_1'
     _spi_com->setClockDivider(SPI_CLOCK_DIV4);
                               ^~~~~~~~~~~~~~
                               SPI_CPOL_1
/Users/peterbendel/Documents/Arduino/libraries/Grove-3-Axis-Digital-Accelerometer-2g-to-16g-LIS3DHTR/src/LIS3DHTR.cpp:51:15: error: 'arduino::SPIClass {aka class arduino::HardwareSPI}' has no member named 'setBitOrder'
     _spi_com->setBitOrder(MSBFIRST);
               ^~~~~~~~~~~
/Users/peterbendel/Documents/Arduino/libraries/Grove-3-Axis-Digital-Accelerometer-2g-to-16g-LIS3DHTR/src/LIS3DHTR.cpp:55:15: error: 'arduino::SPIClass {aka class arduino::HardwareSPI}' has no member named 'setDataMode'
     _spi_com->setDataMode(SPI_MODE3);
               ^~~~~~~~~~~

Using library Arduino_Sensorkit at version 1.0.8 in folder: /Users/peterbendel/Documents/Arduino/libraries/Arduino_Sensorkit 
Using library Wire in folder: /Users/peterbendel/Library/Arduino15/packages/arduino/hardware/mbed_nano/2.6.1/libraries/Wire (legacy)
Using library Grove_-_Barometer_Sensor_BMP280 at version 1.0.1 in folder: /Users/peterbendel/Documents/Arduino/libraries/Grove_-_Barometer_Sensor_BMP280 
Using library Grove-3-Axis-Digital-Accelerometer-2g-to-16g-LIS3DHTR at version 1.2.3 in folder: /Users/peterbendel/Documents/Arduino/libraries/Grove-3-Axis-Digital-Accelerometer-2g-to-16g-LIS3DHTR 
Using library SPI in folder: /Users/peterbendel/Library/Arduino15/packages/arduino/hardware/mbed_nano/2.6.1/libraries/SPI (legacy)
Using library Grove_Temperature_And_Humidity_Sensor-master at version 1.0.0 in folder: /Users/peterbendel/Documents/Arduino/libraries/Grove_Temperature_And_Humidity_Sensor-master 
Using library U8g2 at version 2.31.2 in folder: /Users/peterbendel/Documents/Arduino/libraries/U8g2 
Compilation error: exit status 1

Consider U8g2 instead of U8x8?

Howdy. I got an eval unit from Elaine Wu and sent her a bunch of feedback on issues i thought made this harder to use than it should, for complete beginners.
The documentation on OLED is somewhat lacking, for one it mentions nothing about https://github.com/olikraus/u8g2
U8g2
Includes all graphics procedures (line/box/circle draw).
Supports many fonts. (Almost) no restriction on the font height.
Requires some memory in the microcontroller to render the display.

U8x8
Text output only (character) device.
Only fonts allowed with fit into a 8x8 pixel grid.
Writes directly to the display. No buffer in the microcontroller required.

For now, you have chosen U8x8, but it contains some serious limitations. You should explain how it can be used, and not used. it's non obvious enough that your own oled example used the library wrong (as per #7 )

If the intent is to save memory on those underpowered and obsolete Unos that only have 2KB of RAM (although U8g2 works on them), this should be explained, along with the fact that Oled does not allow drawing lines or anything since it uses U8x8 and not U8g2

OLED Display not working with Air Pressure Module on I2C

Hi there.

I am doing some testing on the Arduino sensor kit base. Specifically, I connected the "Air Pressure" sensor and the "OLED Display" to the support board, both to the I2C connectors.

Using them alone, the air pressure sensor, or the OLED display, work perfectly. However, when I try to use them together, the OLED display stops working.

I tried downloading the latest version of the library (1.0.9) and also importing it as a .zip from this repo.

I conclude that if I try to use the Pressure.begin(); instruction, the OLED display stops working.
How I can resolve this?

Thanks in advice!

I Attach my sample code.

#include <Arduino_SensorKit.h>

void setup() {
  Serial.begin(9600);

  Environment.begin();

  Oled.begin();
  Oled.setFlipMode(true);

  Pressure.begin(); // <- display not working using this line
}

void loop() {
  Oled.setFont(u8x8_font_amstrad_cpc_extended_r); 
  Oled.setCursor(0, 0);
  Oled.print("Hello world"); 
  delay(100);
}

Arduino_Sensorkit.h not found error in Arduino_SensorKit.cpp -> fix to Arduino_SensorKit.h

There seems to be a small problem with the library. Don't know if you accept pull requests, but here's a description:

Compiling fails on Arduino IDE. Error indicates:
Alternatives for Arduino_Sensorkit.h: []/home/jaska/Work/arduino/libraries/Arduino_Sensorkit/src/Arduino_SensorKit.cpp:1:10: fatal error: Arduino_Sensorkit.h: No such file or directory

Looked at Arduino_SensorKit.cpp. Line 1 is:
#include "Arduino_Sensorkit.h"
The header file it's looking for is
Arduino_SensorKit.h

Suggest change of Arduino_SensorKit.cpp to:
#include "Arduino_SensorKit.h"

Line in question:

#include "Arduino_Sensorkit.h"

Library version: 1.0.4

Oled display stay black if Acceleration or Pressure module is added

Hello guys,

I recently bought a Sensor Kit then added an Arduino Uno Rev 3 on it. I use IDE 1.8.3 or 1.8.16 on W10 PC. I try "Combined_Demo.ino" which sounds very promising to me because I was looking for a tool to check all sensors.

All sensors are running well when I tested them individually. Also all other sensors are working well with the Oled display but not Acceleration or Pressure sensors. The issue append even with no command related to these sensors but just Accelerometer.begin(); or Pressure.begin(); function mentioned in the setup() function. The display stay black if I uncomment any of these two functions.

I try Oled.setBusClock(100000); before Oled.begin(); to change bus speed with no success. Let me know if I can try something else.

Thank in advance for your help
Didier
Note : This is my first post in GitHub, please excuse me if it was not the right place to write this. Nobody else can help neither the vendor nor Arduino forum.

Examples/Oled_Display.ino: Screen upside down on base in example

Don't know if you accept pull requests to the examples, but in the Oled_Display.ino example the screen is upside down in relation to the base.

Suggest adding the following to setup function:
void setup() { Oled.begin(); Oled.setFlipMode(true); // Flip the screen orientation 180 degrees }

The function in reference documentation: https://github.com/olikraus/u8g2/wiki/u8x8reference#setflipmode

Function in question

void setup() {
Oled.begin();
}

Library version 1.0.4

Typo in U8X8_SSD1306_128X64_NONAME_HW_I2C Oled constructor?

I found the following code from the U8g2 Lib.

class U8X8_SSD1306_128X64_NONAME_HW_I2C : public U8X8 {
  public: U8X8_SSD1306_128X64_NONAME_HW_I2C(uint8_t reset = U8X8_PIN_NONE, 
             uint8_t clock = U8X8_PIN_NONE, uint8_t data = U8X8_PIN_NONE) : U8X8() {
    u8x8_Setup(getU8x8(), u8x8_d_ssd1306_128x64_noname, 
             u8x8_cad_ssd13xx_fast_i2c, u8x8_byte_arduino_hw_i2c, u8x8_gpio_and_delay_arduino);
    u8x8_SetPin_HW_I2C(getU8x8(), reset, clock, data);
  }
};

The order of the contructor parameters are: reset, clock, data.

In Arduino_SensorKit.cpp An instance (Oled) is created with a different signature.

U8X8_SSD1306_128X64_NONAME_HW_I2C Oled(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE);

Did I miss something, or is this an error? if it is an error, should I fork and contribute?

Documentation update; 3.3/5V switch on the board

@marqdevx , I'll open a separate issue for this.
As a reminder, I'm not asking for personal help, or being demanding :) , I was given this board to test and give feedback on, pretending that I'm a new user, so I'm doing just that :)

You said "You can switch the 3V3/5V switch, it will not make any damage to the Arduino Board cause it has its own regulator. The only issue is that the Display only works with 5V."

So, the arduino board, even if it has a 3.3V MCU, has a 5V line. Therefore your board receives 5V in both cases, but on the VREF line, receive 3.3V or 5V depending on what arduino you have (the newer/better ones, all being 3.3V).
The issue is that if any sensor sends back 5V on a data line that is a 3.3V only GPIO on the board, that GPIO may get fried (you know this of course, just writing it out to be clear)

Documentation that explains what the switch does, would help. Is there a level shifter that takes 5V output from a device and brings it back down to 3.3V so that it doesn't fry anything (looks like not, I found no chips on the board)?
If some of the sensors need 5V for power, every arduino board has a 5V pin, even if the arduino itself works at 3.3V, so I'm confused as to how the switch would help.

Some devices (you said the OLED) only work with 5V data input? (so a 3.3V high from an arduino 101 will not be able to talk to it?)

Basically a page explaining all this in your documentation would be welcome, I know some about those issues, but I'm not fully clear what the switch does, and what devices won't work at 3.3V and why? (it's typically for 5V devices to also work with 3.3V, even neopixels typically work with 3.3V signals)

Examples using I2C should explain that all I2C devices on the board conflict

Unfortunately they were not configured to use different addresses (although it seems possible with small solder points).
An obvious use of the kit is to read pressure or some other I2c value (like accelerometer), but that's not possible since they share I2C and conflict with the OLED. If you turn them on, the OLED stops working.
Not obvious at all for a beginner, documentation is needed.

OLED not working on 1.0.10

When working with an Arduino UNO R4 WiFi, I noticed that the OLED screen was not working on library version 1.0.10.

My code:

#define U8x8_DO_NOT_SET_WIRE_CLOCK

#include "Arduino_SensorKit.h"
 
void setup() {
  Serial.begin(9600);
  Oled.begin();
  Oled.setFlipMode(true);
}
 
void loop() {
  Oled.setFont(u8x8_font_chroma48medium8_r); 
  Oled.setCursor(0, 33);
  Oled.print("test");   
  Oled.refreshDisplay();
  Serial.println("test");
  delay(2000);
}

This code does print test in the serial console, meaning the end of the loop is actually reached. It doesn't show it on the screen though.

I read #21 and I tried the things they said there, but that didn't help.

The reason that I want to use version 1.0.10 and not downgrade to 1.0.8, is that I need version 1.0.10 for my temperature sensor: https://support.arduino.cc/hc/en-us/articles/5211864112924-Arduino-Sensor-Kit-s-DHT20-sensor-reading

Any ideas?

Temperature & Humidity Sensor #define DHTPIN does not work.

The library works fine for pin 3. The method for assigning another digital pin using a #define DHTPIN yourPin does not work and probably can't be made to work.

It does not work even for the example file provided with the library, Temp_and_Humidity.ino.

The problem is that Temp_and_Humidity.ino and Arduino_SensorKit.cpp are compiled independently. The compiler sees the #define DHTPIN yourPin and the does not redefine it to 3 when compiling Temp_and_Humidity.ino, but it can not see it when compiling Arduino_SensorKit.cpp, so the Environment object as DHT(3, DHT11).

The same problem will happen with trying to change the DHTTYPE with a #define.

The versions I am using are the latest available in the Arduino IDE, 1.0.9.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.