Skip to content

nebelgrau77/nano33blesense_sensors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

APDS9960 RGB + clear light read and displayed to SSD1306 OLED

Ported to Arduino 33 BLESense board (https://store.arduino.cc/arduino-nano-33-ble-sense).

According to the schematics (https://content.arduino.cc/assets/NANO33BLE_V2.0_sch.pdf) the APDS9660 sensor is powered from the VDD line, but it won't start without turning on the pin P0.22 (VDD_ENV). \ Also pin P0.20 (APDS_PWR) has to be set HIGH.
Pin P1.00 also has to be set HIGH, as it is connected to R_PULLUP for the SDA1/SCL1 signals.

TO DO:

  • refresh sensor readings with an interrupt or with RTIC, not in a busy loop
  • test other sensor features, such as gestures recognition
  • use built-in RGB LED as output for the color readings

HOW TO FLASH:

  • build the code: cargo build --release
  • convert to .hex file: arm-none-eabi-objcopy -O ihex target/thumbv7em-none-eabihf/release/blinky blinky.hex
  • create a dfu package: adafruit-nrfutil dfu genpkg --dev-type 0x0052 --application blinky.hex blinky.zip
  • put the board into bootloader mode (double click on reset button, will show up as NANO33BOOT or similar)
  • flash the firmware: adafruit-nrfutil dfu serial --package blinky.zip -p /dev/ttyACM0 -b 115200

HOW TO FLASH ADAFRUIT BOOTLOADER:

In order to flash code with nrfutil, Adafruit bootloader has to be flashed onto the board. Two wires need to be attached to the pads on the bottom side of the board (SWDIO and SWCLK).

  • step 1: clone the repo from https://github.com/adafruit/Adafruit_nRF52_Bootloader and build with make BOARD=arduino_nano_33_ble all
  • step 2: flash using Black Magic Probe and GDB: gdb target extended-remote /dev/ttyACM0 monitor swdp_scan attach 1 (Nordic nRF52 M4) load arduino_nano_33_ble_bootloader-0.4.0-2-g4ba802d_s140_6.1.1.hex kill

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages