Close

[CODE] Compatibility with Atmega328p

A project log for Gesture/Pattern Recognition Without Camera : TOF !

Grumpy Hedgehog is a connected device that allows you to read and interact with movements. Its LCD screen displays the Hedgehog's expression

jeanperardeljean.perardel 11/08/2021 at 09:570 Comments

I just finished porting the code to run on an Atmega328p. This means that we can now use standard Arduino boards (UNO, Nano, Leonardo...) 

For a question of integration in the box, I rather recommend using the NANO board. 

#if defined(TEENSYDUINO)
#define TOF_SDA 18
#define TOF_SCL 19
#define VL53L1X_1 17
#define VL53L1X_2 16
#define VL53L1X_3 15
#define VL53L1X_4 14

#elif defined(ARDUINO_SAMD_MKRWIFI1010)
#define TOF_SDA 8
#define TOF_SCL 9
#define VL53L1X_1 7
#define VL53L1X_2 6
#define VL53L1X_3 5
#define VL53L1X_4 4

// #Arduino UNO, NANO, Leonardo...
#else 
#define TOF_SDA A4
#define TOF_SCL A5
#define VL53L1X_1 A0
#define VL53L1X_2 A1
#define VL53L1X_3 A2
#define VL53L1X_4 A3
#endif

Discussions