The Alpha Geek – Geeking Out

Program Arduino

Project #28 – Sensors – Accelerometer ADXL335 – Mk01

——

#DonLucElectronics #DonLuc #Sensors #ADXL335 #Adafruit #SparkFun #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

Accelerometer ADXL335

——

Accelerometer ADXL335

——

Accelerometer ADXL335

——

Sensor

A sensor is a device that produces an output signal for the purpose of sensing a physical phenomenon. In the broadest definition, a sensor is a device, module, machine, or subsystem that detects events or changes in its environment and sends the information to other electronics, frequently a computer processor.

  • Acoustic, sound, vibration
  • Automotive
  • Chemical
  • Electric current, electric potential, magnetic, radio
  • Environment, weather, moisture, humidity
  • Flow, fluid velocity
  • Ionizing radiation, subatomic particles
  • Navigation instruments
  • Position, angle, displacement, distance, speed, acceleration
  • Optical, light, imaging, photon
  • Pressure
  • Force, density, level
  • Thermal, heat, temperature
  • Proximity, presence
  • Sensor technology
  • Speed sensor
  • Others
  • Etc…

SparkFun Triple Axis Accelerometer Breakout – ADXL335

Breakout board for the 3 axis ADXL335 from Analog Devices. This is the latest in a long, proven line of analog sensors, the holy grail of accelerometers. The ADXL335 is a triple axis MEMS accelerometer with extremely low noise and power consumption.

DL2308Mk02

1 x Adafruit METRO M0 Express
1 x DS3231 Precision RTC FeatherWing
1 x SparkFun Triple Axis Accelerometer ADXL335
1 x Rocker Switch – SPST
1 x Resistor 10K Ohm
1 x CR1220 3V Lithium Coin Cell Battery
1 x SparkFun Cerberus USB Cable

Adafruit METRO M0 Express

LED – LED_BUILTIN
SDA – Digital 20
SCL – Digital 21
SW1 – Digital 2
ACX – Analog A0
ACY – Analog A1
ACZ – Analog A2
VIN – +3.3V
GND – GND

——

DL2308Mk02p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #28 - Sensors - Accelerometer ADXL335 - Mk01
28-01
DL2308Mk02p.ino
1 x Adafruit METRO M0 Express
1 x DS3231 Precision RTC FeatherWing
1 x SparkFun Triple Axis Accelerometer ADXL335
1 x Rocker Switch - SPST
1 x Resistor 10K Ohm
1 x CR1220 3V Lithium Coin Cell Battery
1 x SparkFun Cerberus USB Cable
*/

// Include the Library Code
// DS3231 Precision RTC 
#include <RTClib.h>
// Two Wire Interface (TWI/I2C)
#include <Wire.h>
// Keyboard
#include <Keyboard.h>

// Keyboard
String sKeyboard = "";

// DS3231 Precision RTC 
RTC_DS3231 rtc;
String dateRTC = "";
String timeRTC = "";

// Accelerometer
int iX = A0;
int iY = A1;
int iZ = A2;
// Accelerometer
int X = 0;
int Y = 0;
int Z = 0;

// The number of the pushbutton pin
int iButton = 2;
// Variable for reading the pushbutton status
int buttonState = 0;

// Software Version Information
String sver = "28-01";

void loop() {

  // Date and Time RTC
  isRTC ();

  // Accelerometer
  isAccelerometer();

  // Read the state of the pushbutton value:
  buttonState = digitalRead(iButton);

  // Check if the pushbutton is pressed. If it is, the buttonState is HIGH:
  if (buttonState == HIGH) {

     Keyboard.println(sKeyboard);
    
  }

  // Delay 1 sec
  delay(1000);

}

getAccelerometer.ino

// Accelerometer
// Accelerometer
void isAccelerometer(){

  // Accelerometer X, Y, Z
  // X
  X = analogRead(iX);
  Serial.print("X: ");
  Serial.println(X);
  // Y
  Y = analogRead(iY);
  Serial.print("Y: ");
  Serial.println(Y);
  // Z
  Z = analogRead(iZ);
  Serial.print("Z: ");
  Serial.println(Z);

  sKeyboard = sKeyboard + String(X) + "|" + String(Y) + "|" + String(Z) + "|*";

}

getRTC.ino

// Date & Time
// DS3231 Precision RTC
void setupRTC() {

  // DS3231 Precision RTC
  if (! rtc.begin()) {
    Serial.println("Couldn't find RTC");
    Serial.flush();
    while (1) delay(10);
  }

  if (rtc.lostPower()) {
    Serial.println("RTC lost power, let's set the time!");
    // When time needs to be set on a new device, or after a power loss, the
    // following line sets the RTC to the date & time this sketch was compiled
    rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
    // This line sets the RTC with an explicit date & time, for example to set
    // January 21, 2014 at 3am you would call:
    //rtc.adjust(DateTime(2023, 8, 10, 11, 0, 0));
  }
  
}
// Date and Time RTC
void isRTC () {

  // Date and Time
  dateRTC = "";
  timeRTC = "";
  DateTime now = rtc.now();
  
  // Date
  dateRTC = now.year(), DEC; 
  dateRTC = dateRTC + "/";
  dateRTC = dateRTC + now.month(), DEC;
  dateRTC = dateRTC + "/";
  dateRTC = dateRTC + now.day(), DEC;

  Serial.print("Date: ");
  Serial.println(dateRTC);
  
  // Time
  timeRTC = now.hour(), DEC;
  timeRTC = timeRTC + ":";
  timeRTC = timeRTC + now.minute(), DEC;
  timeRTC = timeRTC + ":";
  timeRTC = timeRTC + now.second(), DEC;

  Serial.print("Time: ");
  Serial.println(timeRTC);

  sKeyboard = "SEN|" + sver + "|" + String(dateRTC) + "|" + 
  String(timeRTC) + "|";
  
}

setup.ino

// Setup
void setup()
{
  
  // Serial Begin
  Serial.begin(115200);
  Serial.println("Starting Serial work!");

  // Give display time to power on
  delay(100);
  
  // Wire - Inialize I2C Hardware
  Wire.begin();

  // Give display time to power on
  delay(100);

  // Date & Time RTC
  // DS3231 Precision RTC 
  setupRTC();
  
  // Initialize control over the keyboard:
  Keyboard.begin();

  // Initialize the pushbutton pin as an input
  pinMode(iButton, INPUT);

  // Initialize digital pin LED_BUILTIN as an output
  pinMode(LED_BUILTIN, OUTPUT);
  // Turn the LED on HIGH
  digitalWrite(LED_BUILTIN, HIGH);

  delay( 5000 );

}

——

People can contact us: https://www.donluc.com/?page_id=1927

Technology Experience

  • Programming Language
  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc…)
  • IoT
  • Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
  • Robotics
  • Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
  • Unmanned Vehicles Terrestrial and Marine
  • Machine Learning
  • RTOS
  • Research & Development (R & D)

Instructor, E-Mentor, STEAM, and Arts-Based Training

  • Programming Language
  • IoT
  • PIC Microcontrollers
  • Arduino
  • Raspberry Pi
  • Espressif
  • Robotics

Follow Us

Luc Paquin – Curriculum Vitae – 2023
https://www.donluc.com/luc/

Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/

Don Luc

Project #26 – Radio Frequency – Bluetooth GPS Receiver GP-20U7 – Mk24

——

#DonLucElectronics #DonLuc #RadioFrequency #Bluetooth #GPS #SparkFun #BME280 #CCS811 #IMU #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

Bluetooth GPS Receiver GP-20U7

——

Bluetooth GPS Receiver GP-20U7

——

Bluetooth GPS Receiver GP-20U7

——

GPS Receiver – GP-20U7 (56 Channel)

The GP-20U7 is a compact GPS receiver with a built-in high performances all-in-one GPS chipset. The GP-20U7 accurately provides position, velocity, and time readings as well possessing high sensitivity and tracking capabilities. Thanks to the low power consumption this receiver requires, the GP-20U7 is ideal for portable applications such as tablet PCs, smart phones, and other devices requiring positioning capability. With 56 channels in search mode and 22 channels “All-In-View” tracking, the GP-20U7 is quite the work horse for its size.

DL2307Mk05

1 x SparkFun Thing Plus – ESP32 WROOM
1 x Arduino Uno
1 x SparkFun Bluetooth Mate Silver
1 x SparkFun BME280 – Temperature, Humidity, Barometric Pressure, and Altitude
1 x SparkFun Air Quality Breakout – CCS811
1 x Pololu AltIMU-10 v5
1 x GPS Receiver – GP-20U7
1 x Lithium Ion Battery – 850mAh
2 x SparkFun Cerberus USB Cable

SparkFun Thing Plus – ESP32 WROOM

LED – LED_BUILTIN
SDA – Digital 23
SCL – Digital 22
GPR – Digital 16
GPT – Digital 17
RX2 – Bluetooth
TX2 – Bluetooth
VIN – +3.3V
GND – GND

——

DL2307Mk05ps.ino

/* ***** Don Luc Electronics © *****
Software Version Information
Project #26 - Radio Frequency - Bluetooth GPS Receiver GP-20U7 - Mk24
26-24
DL2307Mk05pr.ino
1 x SparkFun Thing Plus - ESP32 WROOM
1 x Arduino Uno
1 x SparkFun Bluetooth Mate Silver
1 x SparkFun BME280 - Temperature, Humidity, Barometric Pressure, and Altitude
1 x SparkFun Air Quality Breakout - CCS811
1 x Pololu AltIMU-10 v5
1 x GPS Receiver - GP-20U7
1 x Lithium Ion Battery - 85mAh
2 x SparkFun Cerberus USB Cable
*/

// Include the Library Code
// Bluetooth Serial
#include "BluetoothSerial.h"
#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it
#endif
// Two Wire Interface (TWI/I2C)
#include <Wire.h>
// SparkFun BME280 - Temperature, Humidity, Barometric Pressure, and Altitude
#include <SparkFunBME280.h>
// SparkFun CCS811 - eCO2 & tVOC
#include <SparkFunCCS811.h>
// Includes and variables for IMU integration
// STMicroelectronics LSM6DS33 gyroscope and accelerometer
#include <LSM6.h>
// STMicroelectronics LIS3MDL magnetometer
#include <LIS3MDL.h>
// STMicroelectronics LPS25H digital barometer
#include <LPS.h>
// GPS Receiver
#include <TinyGPS++.h>
// ESP32 Hardware Serial
#include <HardwareSerial.h>

// Bluetooth Serial
BluetoothSerial SerialBT;

// SparkFun BME280 - Temperature, Humidity, Barometric Pressure, and Altitude
BME280 myBME280;
float BMEtempC = 0;
float BMEhumid = 0;
float BMEpressure = 0;
float BMEaltitudeM = 0;
String FullString = "";

// SparkFun CCS811 - eCO2 & tVOC
// Default I2C Address
#define CCS811_ADDR 0x5B 
CCS811 myCCS811(CCS811_ADDR);
float CCS811CO2 = 0;
float CCS811TVOC = 0;
String FullStringA = "";

// 9DoF IMU
// STMicroelectronics LSM6DS33 gyroscope and accelerometer
LSM6 imu;
// Accelerometer and Gyroscopes
// Accelerometer
int imuAX;
int imuAY;
int imuAZ;
String FullStringB = "";
// Gyroscopes 
int imuGX;
int imuGY;
int imuGZ;
String FullStringC = "";
// STMicroelectronics LIS3MDL magnetometer
LIS3MDL mag;
// Magnetometer
int magX;
int magY;
int magZ;
String FullStringD = "";
// STMicroelectronics LPS25H digital barometer
LPS ps;
// Digital Barometer
float pressure;
float altitude;
float temperature;
String FullStringF = "";

// ESP32 HardwareSerial
HardwareSerial tGPS(2);

// GPS Receiver
#define gpsRXPIN 16
// This one is unused and doesnt have a conection
#define gpsTXPIN 17
// The TinyGPS++ object
TinyGPSPlus gps;
// Latitude
float TargetLat;
// Longitude
float TargetLon;
String FullStringG = "";
// GPS Date, Time, Speed, Altitude
// GPS Date
String TargetDat;
// GPS Time
String TargetTim;
// GPS Speeds M/S
String TargetSMS;
// GPS Speeds Km/h
String TargetSKH;
// GPS Altitude Meters
String TargetALT;
// GPS Status
String GPSSt = "";
String FullStringH = "";

// Software Version Information
String sver = "26-24";

void loop() {

  // SparkFun BME280 - Temperature, Humidity, Barometric Pressure, and Altitude
  isBME280();

  // SparkFun CCS811 - eCO2 & tVOC
  isCCS811();

  // Accelerometer and Gyroscopes
  isIMU();

  // Magnetometer
  isMag();

  // Barometer
  isBarometer();

  // isGPS
  isGPS();

  // Delay 1 sec
  delay(1000);

}

getAccelGyro.ino

// Accelerometer and Gyroscopes
// Setup IMU
void setupIMU() {

  // Setup IMU
  imu.init();
  // Default
  imu.enableDefault();
  
}
// Accelerometer and Gyroscopes
void isIMU() {

  // Accelerometer and Gyroscopes
  imu.read();
  // Accelerometer x, y, z
  imuAX = imu.a.x;
  imuAY = imu.a.y;
  imuAZ = imu.a.z;
  // Gyroscopes x, y, z
  imuGX = imu.g.x;
  imuGY = imu.g.y;
  imuGZ = imu.g.z;

  // FullString B
  FullStringB = "Accelerometer X = " + String(imuAX) + " Accelerometer Y = "
  + String(imuAY) + " Accelerometer Z = " + String(imuAZ) 
  + "\r\n";

  // FullStringB Bluetooth Serial + Serial
  for(int i = 0; i < FullStringB.length(); i++)
  {

    // Bluetooth Serial
    SerialBT.write(FullStringB.c_str()[i]);
    // Serial
    Serial.write(FullStringB.c_str()[i]);
    
  }

  // FullString C
  FullStringC = "Gyroscopes X = " + String(imuGX) + " Gyroscopes Y = "
  + String(imuGY) + " Gyroscopes Z = " + String(imuGZ) 
  + "\r\n";

  // FullStringC Bluetooth Serial + Serial
  for(int i = 0; i < FullStringC.length(); i++)
  {

    // Bluetooth Serial
    SerialBT.write(FullStringC.c_str()[i]);
    // Serial
    Serial.write(FullStringC.c_str()[i]);
    
  }

}

getBME280.ino

// SparkFun BME280 - Temperature, Humidity, Barometric Pressure, and Altitude
// isBME280 - Temperature, Humidity, Barometric Pressure, and Altitude
void isBME280(){

  // Temperature Celsius
  BMEtempC = myBME280.readTempC();
  // Humidity
  BMEhumid = myBME280.readFloatHumidity();
  // Barometric Pressure
  BMEpressure = myBME280.readFloatPressure();
  // Altitude Meters
  BMEaltitudeM = (myBME280.readFloatAltitudeMeters(), 2);

  // FullString
  FullString = "Temperature = " + String(BMEtempC,2) + " Humidity = "
  + String(BMEhumid,2) + " Barometric = " + String(BMEpressure,2) 
  + " Altitude Meters = " + String(BMEaltitudeM,2) + "\r\n";

  // FullString Bluetooth Serial + Serial
  for(int i = 0; i < FullString.length(); i++)
  {

    // Bluetooth Serial
    SerialBT.write(FullString.c_str()[i]);
    // Serial
    Serial.write(FullString.c_str()[i]);
    
  }

}

getBarometer.ino

// STMicroelectronics LPS25H digital barometer
// Setup Barometer
void isSetupBarometer(){

  // Setup Barometer
  ps.init();
  // Default
  ps.enableDefault();
  
}
// Barometer
void isBarometer(){

  // Barometer
  pressure = ps.readPressureMillibars();
  // Altitude Meters
  altitude = ps.pressureToAltitudeMeters(pressure);
  // Temperature Celsius
  temperature = ps.readTemperatureC();

  // FullStringF
  FullStringF = "Barometer = " + String(pressure,2) + " Altitude Meters = "
  + String(altitude,2) + " Temperature Celsius = "
  + String(temperature,2) + "\r\n";

  // FullStringF Bluetooth Serial + Serial
  for(int i = 0; i < FullStringF.length(); i++)
  {

    // Bluetooth Serial
    SerialBT.write(FullStringF.c_str()[i]);
    // Serial
    Serial.write(FullStringF.c_str()[i]);
    
  }
  
}

getCCS811.ino

// CCS811 - eCO2 & tVOC
// isCCS811 - eCO2 & tVOC
void isCCS811(){

  // This sends the temperature & humidity data to the CCS811
  myCCS811.setEnvironmentalData(BMEhumid, BMEtempC);

  // Calling this function updates the global tVOC and eCO2 variables
  myCCS811.readAlgorithmResults();

  // eCO2 Concentration
  CCS811CO2 = myCCS811.getCO2();
  
  // tVOC Concentration
  CCS811TVOC = myCCS811.getTVOC();

  // FullStringA
  FullStringA = "TVOCs = " + String(CCS811TVOC,2) + " eCO2 = "
  + String(CCS811CO2,2) + "\r\n";

  // FullStringA Bluetooth Serial + Serial
  for(int i = 0; i < FullStringA.length(); i++)
  {

    // Bluetooth Serial
    SerialBT.write(FullStringA.c_str()[i]);
    // Serial
    Serial.write(FullStringA.c_str()[i]);
    
  }

}

getGPS.ino

// GPS Receiver
// Setup GPS
void setupGPS() {

  // Setup GPS
  tGPS.begin(  9600 , SERIAL_8N1 , gpsRXPIN , gpsTXPIN );
  
}
// isGPS
void isGPS(){

  // Receives NEMA data from GPS receiver
  // This sketch displays information every time a new sentence is correctly encoded
  while ( tGPS.available() > 0)
    
    if (gps.encode( tGPS.read() ))
    {
     
       // GPS Vector Pointer Target
       displayInfo();
       // GPS Date, Time, Speed, Altitude
       displayDTS();
       
    }

  if (millis() > 5000 && gps.charsProcessed() < 10)
  {

     while(true);
    
  }

}
// GPS Vector Pointer Target
void displayInfo(){

  // Location
  if (gps.location.isValid())
  {
    
     // Latitude
     TargetLat = gps.location.lat();
     // Longitude
     TargetLon = gps.location.lng();
     // GPS Status 2
     GPSSt = "Yes";

     // FullStringG
     FullStringG = "Latitude = " + String(TargetLat) + " Longitude = "
     + String(TargetLon) + "\r\n";

     // FullStringG Bluetooth Serial + Serial
     for(int i = 0; i < FullStringG.length(); i++)
     {

       // Bluetooth Serial
       SerialBT.write(FullStringG.c_str()[i]);
       // Serial
       Serial.write(FullStringG.c_str()[i]);
    
     }
    
  }
  else
  {

     // GPS Status 0
     GPSSt = "No";
    
  }

}
// GPS Date, Time, Speed, Altitude
void displayDTS(){

  // Date
  TargetDat = ""; 
  if (gps.date.isValid())
  {
    
     // Date
     // Year
     TargetDat += String(gps.date.year(), DEC);
     TargetDat += "/";
     // Month
     TargetDat += String(gps.date.month(), DEC);
     TargetDat += "/";
     // Day
     TargetDat += String(gps.date.day(), DEC);

     // FullStringH
     FullStringH = "Date = " + String(TargetDat) + "\r\n";

     // FullStringH Bluetooth Serial + Serial
     for(int i = 0; i < FullStringH.length(); i++)
     {

       // Bluetooth Serial
       SerialBT.write(FullStringH.c_str()[i]);
       // Serial
       Serial.write(FullStringH.c_str()[i]);
    
     }
    
  }

  // Time
  TargetTim = "";
  if (gps.time.isValid())
  {
    
     // Time
     // Hour
     TargetTim += String(gps.time.hour(), DEC);
     TargetTim += ":";
     // Minute
     TargetTim += String(gps.time.minute(), DEC);
     TargetTim += ":";
     // Secound
     TargetTim += String(gps.time.second(), DEC);

     // FullStringH
     FullStringH = "Time = " + String(TargetTim) + "\r\n";

     // FullStringH Bluetooth Serial + Serial
     for(int i = 0; i < FullStringH.length(); i++)
     {

       // Bluetooth Serial
       SerialBT.write(FullStringH.c_str()[i]);
       // Serial
       Serial.write(FullStringH.c_str()[i]);
    
     }
    
  }

  // Speed
  TargetSMS = "";
  TargetSKH = "";
  if (gps.speed.isValid())
  {
    
     // Speed
     // M/S
     int x = gps.speed.mps();
     TargetSMS = String( x, DEC);
     // Km/h
     int y = gps.speed.kmph();
     TargetSKH = String( y, DEC);

     // FullStringH
     FullStringH = "Speed = " + String(TargetSMS) + "\r\n";

     // FullStringH Bluetooth Serial + Serial
     for(int i = 0; i < FullStringH.length(); i++)
     {

       // Bluetooth Serial
       SerialBT.write(FullStringH.c_str()[i]);
       // Serial
       Serial.write(FullStringH.c_str()[i]);
    
     }

  }

  // Altitude
  TargetALT = "";
  if (gps.altitude.isValid())
  {
    
     // Altitude
     // Meters
     int z = gps.altitude.meters();
     TargetALT = String( z, DEC);

     // FullStringH
     FullStringH = "Altitude = " + String(TargetALT) + "\r\n";

     // FullStringH Bluetooth Serial + Serial
     for(int i = 0; i < FullStringH.length(); i++)
     {

       // Bluetooth Serial
       SerialBT.write(FullStringH.c_str()[i]);
       // Serial
       Serial.write(FullStringH.c_str()[i]);
    
     }

  }
 
}

getMagnetometer.ino

// Magnetometer
// Setup Magnetometer
void setupMag() {

  // Setup Magnetometer
  mag.init();
  // Default
  mag.enableDefault();
  
}
// Magnetometer
void isMag() {

  // Magnetometer
  mag.read();
  // Magnetometer x, y, z
  magX = mag.m.x;
  magY = mag.m.y;
  magZ = mag.m.z;

  // FullString D
  FullStringD = "Magnetometer X = " + String(magX) + " Magnetometer Y = "
  + String(magY) + " Magnetometer Z = " + String(magZ) 
  + "\r\n";

  // FullStringD Bluetooth Serial + Serial
  for(int i = 0; i < FullStringD.length(); i++)
  {

    // Bluetooth Serial
    SerialBT.write(FullStringD.c_str()[i]);
    // Serial
    Serial.write(FullStringD.c_str()[i]);
    
  }
  
}

setup.ino

// Setup
void setup()
{
  
  // Serial Begin
  Serial.begin(9600);
  Serial.println("Starting BLE work!");

  // Bluetooth Serial
  SerialBT.begin("Don Luc Electronics");
  Serial.println("Bluetooth Started! Ready to pair...");

  // Give display time to power on
  delay(100);
  
  // Wire - Inialize I2C Hardware
  Wire.begin();

  // Give display time to power on
  delay(100);

  // SparkFun BME280 - Temperature, Humidity, Barometric Pressure, and Altitude 
  myBME280.begin();

  // CCS811 - eCO2 & tVOC
  myCCS811.begin();

  // Setup IMU
  setupIMU();

  // Setup Magnetometer
  setupMag();

  // Setup Barometer
  isSetupBarometer();

  // GPS Receiver
  // Setup GPS
  setupGPS();
  
  // Initialize digital pin LED_BUILTIN as an output
  pinMode(LED_BUILTIN, OUTPUT);
  // Turn the LED on HIGH
  digitalWrite(LED_BUILTIN, HIGH);

}

——

Arduino Uno

RX – Digital 3
TX – Digital 2
VIN – +3.3V
GND – GND

——

DL2307Mk05pr.ino

/* ***** Don Luc Electronics © *****
Software Version Information
Project #26 - Radio Frequency - Bluetooth GPS Receiver GP-20U7 - Mk24
26-24
DL2307Mk05pr.ino
1 x Arduino Uno
1 x SparkFun RedBoard Qwiic
1 x SparkFun Bluetooth Mate Silver
1 x SparkFun BME280 - Temperature, Humidity, Barometric Pressure, and Altitude
1 x SparkFun Air Quality Breakout - CCS811
1 x Pololu AltIMU-10 v5
1 x GPS Receiver - GP-20U7
1 x Lithium Ion Battery - 85mAh
2 x SparkFun Cerberus USB Cable
*/

// Include the Library Code
// Software Serial
#include <SoftwareSerial.h>

// Software Serial
// TX-O pin of bluetooth mate, Arduino D2
int bluetoothTx = 2;
// RX-I pin of bluetooth mate, Arduino D3
int bluetoothRx = 3;
// Bluetooth
SoftwareSerial bluetooth(bluetoothTx, bluetoothRx);
// BTA
//String BTA = "0006664FDC9E"; 

// Software Version Information
String sver = "26-24";

void loop() {

  // isBluetooth
  isBluetooth();
 
}

getBluetooth.ino

// Bluetooth
// Setup Bluetooth
void isSetupBluetooth(){

  // Setup Bluetooth
  // Begin the serial monitor at 9600bps
  Serial.begin(9600);
  // Bluetooth
  // The Bluetooth Mate defaults to 115200bps
  bluetooth.begin(115200);
  // Print three times individually
  bluetooth.print("$");
  bluetooth.print("$");
  bluetooth.print("$");
  // Enter command mode
  // Short delay, wait for the Mate to send back CMD
  delay(100);
  // Temporarily Change the baudrate to 9600, no parity
  bluetooth.println("U,9600,N");
  // 115200 can be too fast at times for NewSoftSerial to relay the data reliably
  // Start bluetooth serial at 9600
  bluetooth.begin(9600);
  
}
// isBluetooth
void isBluetooth() {

  // If the bluetooth sent any characters
  if(bluetooth.available())
  {
    
    // Send any characters the bluetooth prints to the serial monitor
    Serial.print((char)bluetooth.read());
    
  }
  // If stuff was typed in the serial monitor
  if(Serial.available())
  {
    
    // Send any characters the Serial monitor prints to the bluetooth
    bluetooth.print((char)Serial.read());
    
  }

}

setup.ino

// Setup
void setup()
{
  
  // Setup Bluetooth
  isSetupBluetooth();

}

——

People can contact us: https://www.donluc.com/?page_id=1927

Technology Experience

  • Programming Language
  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc…)
  • IoT
  • Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
  • Robotics
  • Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
  • Unmanned Vehicles Terrestrial and Marine
  • Machine Learning
  • RTOS
  • Research & Development (R & D)

Instructor, E-Mentor, STEAM, and Arts-Based Training

  • Programming Language
  • IoT
  • PIC Microcontrollers
  • Arduino
  • Raspberry Pi
  • Espressif
  • Robotics

Follow Us

Luc Paquin – Curriculum Vitae – 2023
https://www.donluc.com/luc/

Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/

Don Luc

Project #26 – Radio Frequency – Bluetooth Pololu AltIMU-10 – Mk23

——

#DonLucElectronics #DonLuc #RadioFrequency #Bluetooth #SparkFun #BME280 #CCS811 #IMU #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

Bluetooth Pololu AltIMU-10

——

Bluetooth Pololu AltIMU-10

——

Bluetooth Pololu AltIMU-10

——

AltIMU-10 v5 Gyro, Accelerometer, Compass, and Altimeter

The Pololu AltIMU-10 v5 is an inertial measurement unit (IMU) and altimeter that features the same LSM6DS33 gyro and accelerometer and LIS3MDL magnetometer as the MinIMU-9 v5, and adds an LPS25H digital barometer. An I²C interface accesses ten independent pressure, rotation, acceleration, and magnetic measurements that can be used to calculate the sensor’s altitude and absolute orientation. The Pololu AltIMU-10 v5 is a compact board that combines ST’s LSM6DS33 3-axis gyroscope and 3-axis accelerometer, LIS3MDL 3-axis magnetometer, and LPS25H digital barometer to form an inertial measurement unit (IMU) and altimeter.

DL2307Mk04

1 x SparkFun Thing Plus – ESP32 WROOM
1 x Arduino Uno
1 x SparkFun Bluetooth Mate Silver
1 x SparkFun BME280 – Temperature, Humidity, Barometric Pressure, and Altitude
1 x SparkFun Air Quality Breakout – CCS811
1 x Pololu AltIMU-10 v5
1 x Lithium Ion Battery – 850mAh
2 x SparkFun Cerberus USB Cable

SparkFun Thing Plus – ESP32 WROOM

LED – LED_BUILTIN
SDA – Digital 23
SCL – Digital 22
RX2 – Bluetooth
TX2 – Bluetooth
VIN – +3.3V
GND – GND

——

DL2307Mk04ps.ino

/* ***** Don Luc Electronics © *****
Software Version Information
Project #26 - Radio Frequency - Bluetooth Pololu AltIMU-10 - Mk23
26-23
DL2307Mk04pr.ino
1 x SparkFun Thing Plus - ESP32 WROOM
1 x Arduino Uno
1 x SparkFun Bluetooth Mate Silver
1 x SparkFun BME280 - Temperature, Humidity, Barometric Pressure, and Altitude
1 x SparkFun Air Quality Breakout - CCS811
1 x Pololu AltIMU-10 v5
1 x Lithium Ion Battery - 85mAh
2 x SparkFun Cerberus USB Cable
*/

// Include the Library Code
// Bluetooth Serial
#include "BluetoothSerial.h"
#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it
#endif
// Two Wire Interface (TWI/I2C)
#include <Wire.h>
// SparkFun BME280 - Temperature, Humidity, Barometric Pressure, and Altitude
#include <SparkFunBME280.h>
// SparkFun CCS811 - eCO2 & tVOC
#include <SparkFunCCS811.h>
// Includes and variables for IMU integration
// STMicroelectronics LSM6DS33 gyroscope and accelerometer
#include <LSM6.h>
// STMicroelectronics LIS3MDL magnetometer
#include <LIS3MDL.h>
// STMicroelectronics LPS25H digital barometer
#include <LPS.h>

// Bluetooth Serial
BluetoothSerial SerialBT;

// SparkFun BME280 - Temperature, Humidity, Barometric Pressure, and Altitude
BME280 myBME280;
float BMEtempC = 0;
float BMEhumid = 0;
float BMEpressure = 0;
float BMEaltitudeM = 0;
String FullString = "";

// SparkFun CCS811 - eCO2 & tVOC
// Default I2C Address
#define CCS811_ADDR 0x5B 
CCS811 myCCS811(CCS811_ADDR);
float CCS811CO2 = 0;
float CCS811TVOC = 0;
String FullStringA = "";

// 9DoF IMU
// STMicroelectronics LSM6DS33 gyroscope and accelerometer
LSM6 imu;
// Accelerometer and Gyroscopes
// Accelerometer
int imuAX;
int imuAY;
int imuAZ;
String FullStringB = "";
// Gyroscopes 
int imuGX;
int imuGY;
int imuGZ;
String FullStringC = "";
// STMicroelectronics LIS3MDL magnetometer
LIS3MDL mag;
// Magnetometer
int magX;
int magY;
int magZ;
String FullStringD = "";
// STMicroelectronics LPS25H digital barometer
LPS ps;
// Digital Barometer
float pressure;
float altitude;
float temperature;
String FullStringF = "";

// Software Version Information
String sver = "26-23";

void loop() {

  // SparkFun BME280 - Temperature, Humidity, Barometric Pressure, and Altitude
  isBME280();

  // SparkFun CCS811 - eCO2 & tVOC
  isCCS811();

  // Accelerometer and Gyroscopes
  isIMU();

  // Magnetometer
  isMag();

  // Barometer
  isBarometer();

  // Delay 1 sec
  delay(1000);

}

getAccelGyro.ino

// Accelerometer and Gyroscopes
// Setup IMU
void setupIMU() {

  // Setup IMU
  imu.init();
  // Default
  imu.enableDefault();
  
}
// Accelerometer and Gyroscopes
void isIMU() {

  // Accelerometer and Gyroscopes
  imu.read();
  // Accelerometer x, y, z
  imuAX = imu.a.x;
  imuAY = imu.a.y;
  imuAZ = imu.a.z;
  // Gyroscopes x, y, z
  imuGX = imu.g.x;
  imuGY = imu.g.y;
  imuGZ = imu.g.z;

  // FullString B
  FullStringB = "Accelerometer X = " + String(imuAX) + " Accelerometer Y = "
  + String(imuAY) + " Accelerometer Z = " + String(imuAZ) 
  + "\r\n";

  // FullStringB Bluetooth Serial + Serial
  for(int i = 0; i < FullStringB.length(); i++)
  {

    // Bluetooth Serial
    SerialBT.write(FullStringB.c_str()[i]);
    // Serial
    Serial.write(FullStringB.c_str()[i]);
    
  }

  // FullString C
  FullStringC = "Gyroscopes X = " + String(imuGX) + " Gyroscopes Y = "
  + String(imuGY) + " Gyroscopes Z = " + String(imuGZ) 
  + "\r\n";

  // FullStringC Bluetooth Serial + Serial
  for(int i = 0; i < FullStringC.length(); i++)
  {

    // Bluetooth Serial
    SerialBT.write(FullStringC.c_str()[i]);
    // Serial
    Serial.write(FullStringC.c_str()[i]);
    
  }

}

getBME280.ino

// SparkFun BME280 - Temperature, Humidity, Barometric Pressure, and Altitude
// isBME280 - Temperature, Humidity, Barometric Pressure, and Altitude
void isBME280(){

  // Temperature Celsius
  BMEtempC = myBME280.readTempC();
  // Humidity
  BMEhumid = myBME280.readFloatHumidity();
  // Barometric Pressure
  BMEpressure = myBME280.readFloatPressure();
  // Altitude Meters
  BMEaltitudeM = (myBME280.readFloatAltitudeMeters(), 2);

  // FullString
  FullString = "Temperature = " + String(BMEtempC,2) + " Humidity = "
  + String(BMEhumid,2) + " Barometric = " + String(BMEpressure,2) 
  + " Altitude Meters = " + String(BMEaltitudeM,2) + "\r\n";

  // FullString Bluetooth Serial + Serial
  for(int i = 0; i < FullString.length(); i++)
  {

    // Bluetooth Serial
    SerialBT.write(FullString.c_str()[i]);
    // Serial
    Serial.write(FullString.c_str()[i]);
    
  }

}

getBarometer.ino

// STMicroelectronics LPS25H digital barometer
// Setup Barometer
void isSetupBarometer(){

  // Setup Barometer
  ps.init();
  // Default
  ps.enableDefault();
  
}
// Barometer
void isBarometer(){

  // Barometer
  pressure = ps.readPressureMillibars();
  // Altitude Meters
  altitude = ps.pressureToAltitudeMeters(pressure);
  // Temperature Celsius
  temperature = ps.readTemperatureC();

  // FullStringF
  FullStringF = "Barometer = " + String(pressure,2) + " Altitude Meters = "
  + String(altitude,2) + " Temperature Celsius = "
  + String(temperature,2) + "\r\n";

  // FullStringF Bluetooth Serial + Serial
  for(int i = 0; i < FullStringF.length(); i++)
  {

    // Bluetooth Serial
    SerialBT.write(FullStringF.c_str()[i]);
    // Serial
    Serial.write(FullStringF.c_str()[i]);
    
  }
  
}

getCCS811.ino

// CCS811 - eCO2 & tVOC
// isCCS811 - eCO2 & tVOC
void isCCS811(){

  // This sends the temperature & humidity data to the CCS811
  myCCS811.setEnvironmentalData(BMEhumid, BMEtempC);

  // Calling this function updates the global tVOC and eCO2 variables
  myCCS811.readAlgorithmResults();

  // eCO2 Concentration
  CCS811CO2 = myCCS811.getCO2();
  
  // tVOC Concentration
  CCS811TVOC = myCCS811.getTVOC();

  // FullStringA
  FullStringA = "TVOCs = " + String(CCS811TVOC,2) + " eCO2 = "
  + String(CCS811CO2,2) + "\r\n";

  // FullStringA Bluetooth Serial + Serial
  for(int i = 0; i < FullStringA.length(); i++)
  {

    // Bluetooth Serial
    SerialBT.write(FullStringA.c_str()[i]);
    // Serial
    Serial.write(FullStringA.c_str()[i]);
    
  }

}

getMagnetometer.ino

// Magnetometer
// Setup Magnetometer
void setupMag() {

  // Setup Magnetometer
  mag.init();
  // Default
  mag.enableDefault();
  
}
// Magnetometer
void isMag() {

  // Magnetometer
  mag.read();
  // Magnetometer x, y, z
  magX = mag.m.x;
  magY = mag.m.y;
  magZ = mag.m.z;

  // FullString D
  FullStringD = "Magnetometer X = " + String(magX) + " Magnetometer Y = "
  + String(magY) + " Magnetometer Z = " + String(magZ) 
  + "\r\n";

  // FullStringD Bluetooth Serial + Serial
  for(int i = 0; i < FullStringD.length(); i++)
  {

    // Bluetooth Serial
    SerialBT.write(FullStringD.c_str()[i]);
    // Serial
    Serial.write(FullStringD.c_str()[i]);
    
  }
  
}

setup.ino

// Setup
void setup()
{
  
  // Serial Begin
  Serial.begin(9600);
  Serial.println("Starting BLE work!");

  // Bluetooth Serial
  SerialBT.begin("Don Luc Electronics");
  Serial.println("Bluetooth Started! Ready to pair...");

  // Give display time to power on
  delay(100);
  
  // Wire - Inialize I2C Hardware
  Wire.begin();

  // Give display time to power on
  delay(100);

  // SparkFun BME280 - Temperature, Humidity, Barometric Pressure, and Altitude 
  myBME280.begin();

  // CCS811 - eCO2 & tVOC
  myCCS811.begin();

  // Setup IMU
  setupIMU();

  // Setup Magnetometer
  setupMag();

  // Setup Barometer
  isSetupBarometer();
  
  // Initialize digital pin LED_BUILTIN as an output
  pinMode(LED_BUILTIN, OUTPUT);
  // Turn the LED on HIGH
  digitalWrite(LED_BUILTIN, HIGH);

}

——

Arduino Uno

RX – Digital 3
TX – Digital 2
VIN – +3.3V
GND – GND

——

DL2307Mk04pr.ino

/* ***** Don Luc Electronics © *****
Software Version Information
Project #26 - Radio Frequency - Bluetooth Pololu AltIMU-10 - Mk23
26-23
DL2307Mk04pr.ino
1 x Arduino Uno
1 x SparkFun RedBoard Qwiic
1 x SparkFun Bluetooth Mate Silver
1 x SparkFun BME280 - Temperature, Humidity, Barometric Pressure, and Altitude
1 x SparkFun Air Quality Breakout - CCS811
1 x Pololu AltIMU-10 v5
1 x Lithium Ion Battery - 85mAh
2 x SparkFun Cerberus USB Cable
*/

// Include the Library Code
// Software Serial
#include <SoftwareSerial.h>

// Software Serial
// TX-O pin of bluetooth mate, Arduino D2
int bluetoothTx = 2;
// RX-I pin of bluetooth mate, Arduino D3
int bluetoothRx = 3;
// Bluetooth
SoftwareSerial bluetooth(bluetoothTx, bluetoothRx);
// BTA
//String BTA = "0006664FDC9E"; 

// Software Version Information
String sver = "26-23";

void loop() {

  // isBluetooth
  isBluetooth();
 
}

getBluetooth.ino

// Bluetooth
// Setup Bluetooth
void isSetupBluetooth(){

  // Setup Bluetooth
  // Begin the serial monitor at 9600bps
  Serial.begin(9600);
  // Bluetooth
  // The Bluetooth Mate defaults to 115200bps
  bluetooth.begin(115200);
  // Print three times individually
  bluetooth.print("$");
  bluetooth.print("$");
  bluetooth.print("$");
  // Enter command mode
  // Short delay, wait for the Mate to send back CMD
  delay(100);
  // Temporarily Change the baudrate to 9600, no parity
  bluetooth.println("U,9600,N");
  // 115200 can be too fast at times for NewSoftSerial to relay the data reliably
  // Start bluetooth serial at 9600
  bluetooth.begin(9600);
  
}
// isBluetooth
void isBluetooth() {

  // If the bluetooth sent any characters
  if(bluetooth.available())
  {
    
    // Send any characters the bluetooth prints to the serial monitor
    Serial.print((char)bluetooth.read());
    
  }
  // If stuff was typed in the serial monitor
  if(Serial.available())
  {
    
    // Send any characters the Serial monitor prints to the bluetooth
    bluetooth.print((char)Serial.read());
    
  }

}

setup.ino

// Setup
void setup()
{
  
  // Setup Bluetooth
  isSetupBluetooth();

}

——

People can contact us: https://www.donluc.com/?page_id=1927

Technology Experience

  • Programming Language
  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc…)
  • IoT
  • Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
  • Robotics
  • Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
  • Unmanned Vehicles Terrestrial and Marine
  • Machine Learning
  • RTOS
  • Research & Development (R & D)

Instructor, E-Mentor, STEAM, and Arts-Based Training

  • Programming Language
  • IoT
  • PIC Microcontrollers
  • Arduino
  • Raspberry Pi
  • Espressif
  • Robotics

Follow Us

Luc Paquin – Curriculum Vitae – 2023
https://www.donluc.com/luc/

Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/

Don Luc

Project #26 – Radio Frequency – Bluetooth CCS811 – Mk22

——

#DonLucElectronics #DonLuc #RadioFrequency #Bluetooth #SparkFun #BME280 #CCS811 #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

Bluetooth CCS811

——

Bluetooth CCS811

——

Bluetooth CCS811

——

SparkFun Air Quality Breakout – CCS811

The CCS811 Air Quality Breakout is a digital gas sensor solution that senses a wide range of Total Volatile Organic Compounds (TVOCs), including equivalent carbon dioxide (eCO2) and metal oxide (MOX) levels. VOCs are often categorized as pollutants and or sensory irritants and can come from a variety of sources like construction materials, machines and even people. This breakout is intended for indoor air quality monitoring in personal devices such as watches and phone.

DL2307Mk03

1 x SparkFun Thing Plus – ESP32 WROOM
1 x Arduino Uno
1 x SparkFun Bluetooth Mate Silver
1 x SparkFun BME280 – Temperature, Humidity, Barometric Pressure, and Altitude
1 x SparkFun Air Quality Breakout – CCS811
1 x Lithium Ion Battery – 850mAh
2 x SparkFun Cerberus USB Cable

SparkFun Thing Plus – ESP32 WROOM

LED – LED_BUILTIN
SDA – Digital 23
SCL – Digital 22
RX2 – Bluetooth
TX2 – Bluetooth
VIN – +3.3V
GND – GND

——

DL2307Mk03ps.ino

/* ***** Don Luc Electronics © *****
Software Version Information
Project #26 - Radio Frequency - SparkFun CCS811 - Mk22
26-22
DL2307Mk03pr.ino
1 x SparkFun Thing Plus - ESP32 WROOM
1 x Arduino Uno
1 x SparkFun Bluetooth Mate Silver
1 x SparkFun BME280 - Temperature, Humidity, Barometric Pressure, and Altitude
1 x SparkFun Air Quality Breakout - CCS811
1 x Lithium Ion Battery - 850mAh
2 x SparkFun Cerberus USB Cable
*/

// Include the Library Code
// Bluetooth Serial
#include "BluetoothSerial.h"
#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it
#endif
// Two Wire Interface (TWI/I2C)
#include <Wire.h>
// SparkFun BME280 - Temperature, Humidity, Barometric Pressure, and Altitude
#include <SparkFunBME280.h>
// SparkFun CCS811 - eCO2 & tVOC
#include <SparkFunCCS811.h>

// Bluetooth Serial
BluetoothSerial SerialBT;

// SparkFun BME280 - Temperature, Humidity, Barometric Pressure, and Altitude
BME280 myBME280;
float BMEtempC = 0;
float BMEhumid = 0;
float BMEpressure = 0;
float BMEaltitudeM = 0;
String FullString = "";

// SparkFun CCS811 - eCO2 & tVOC
// Default I2C Address
#define CCS811_ADDR 0x5B 
CCS811 myCCS811(CCS811_ADDR);
float CCS811CO2 = 0;
float CCS811TVOC = 0;
String FullStringA = "";

// Software Version Information
String sver = "26-22";

void loop() {

  // SparkFun BME280 - Temperature, Humidity, Barometric Pressure, and Altitude
  isBME280();

  // SparkFun CCS811 - eCO2 & tVOC
  isCCS811();

  // Delay 1 sec
  delay(1000);

}

getBME280.ino

// SparkFun BME280 - Temperature, Humidity, Barometric Pressure, and Altitude
// isBME280 - Temperature, Humidity, Barometric Pressure, and Altitude
void isBME280(){

  // Temperature Celsius
  BMEtempC = myBME280.readTempC();
  // Humidity
  BMEhumid = myBME280.readFloatHumidity();
  // Barometric Pressure
  BMEpressure = myBME280.readFloatPressure();
  // Altitude Meters
  BMEaltitudeM = (myBME280.readFloatAltitudeMeters(), 2);

  // FullString
  FullString = "Temperature = " + String(BMEtempC,2) + " Humidity = "
  + String(BMEhumid,2) + " Barometric = " + String(BMEpressure,2) 
  + " Altitude Meters = " + String(BMEaltitudeM,2) + "\r\n";

  // FullString Bluetooth Serial + Serial
  for(int i = 0; i < FullString.length(); i++)
  {

    // Bluetooth Serial
    SerialBT.write(FullString.c_str()[i]);
    // Serial
    Serial.write(FullString.c_str()[i]);
    
  }

}

getCCS811.ino

// CCS811 - eCO2 & tVOC
// isCCS811 - eCO2 & tVOC
void isCCS811(){

  // This sends the temperature & humidity data to the CCS811
  myCCS811.setEnvironmentalData(BMEhumid, BMEtempC);

  // Calling this function updates the global tVOC and eCO2 variables
  myCCS811.readAlgorithmResults();

  // eCO2 Concentration
  CCS811CO2 = myCCS811.getCO2();
  
  // tVOC Concentration
  CCS811TVOC = myCCS811.getTVOC();

  // FullStringA
  FullStringA = "TVOCs = " + String(CCS811TVOC,2) + " eCO2 = "
  + String(CCS811CO2,2) + "\r\n";

  // FullStringA Bluetooth Serial + Serial
  for(int i = 0; i < FullStringA.length(); i++)
  {

    // Bluetooth Serial
    SerialBT.write(FullStringA.c_str()[i]);
    // Serial
    Serial.write(FullStringA.c_str()[i]);
    
  }

}

setup.ino

// Setup
void setup()
{
  
  // Serial Begin
  Serial.begin(9600);
  Serial.println("Starting BLE work!");

  // Bluetooth Serial
  SerialBT.begin("Don Luc Electronics");
  Serial.println("Bluetooth Started! Ready to pair...");

  // Give display time to power on
  delay(100);
  
  // Wire - Inialize I2C Hardware
  Wire.begin();

  // Give display time to power on
  delay(100);

  // SparkFun BME280 - Temperature, Humidity, Barometric Pressure, and Altitude 
  myBME280.begin();

  // CCS811 - eCO2 & tVOC
  myCCS811.begin();

  // Initialize digital pin LED_BUILTIN as an output
  pinMode(LED_BUILTIN, OUTPUT);
  // Turn the LED on HIGH
  digitalWrite(LED_BUILTIN, HIGH);

}

——

Arduino Uno

RX – Digital 3
TX – Digital 2
VIN – +3.3V
GND – GND

DL2307Mk03pr.ino

/* ***** Don Luc Electronics © *****
Software Version Information
Project #26 - Radio Frequency - Bluetooth CCS811 - Mk22
26-22
DL2307Mk03pr.ino
1 x Arduino Uno
1 x SparkFun RedBoard Qwiic
1 x SparkFun Bluetooth Mate Silver
1 x SparkFun BME280 - Temperature, Humidity, Barometric Pressure, and Altitude
1 x SparkFun Air Quality Breakout - CCS811
1 x Lithium Ion Battery - 850mAh
2 x SparkFun Cerberus USB Cable
*/

// Include the Library Code
// Software Serial
#include <SoftwareSerial.h>

// Software Serial
// TX-O pin of bluetooth mate, Arduino D2
int bluetoothTx = 2;
// RX-I pin of bluetooth mate, Arduino D3
int bluetoothRx = 3;
// Bluetooth
SoftwareSerial bluetooth(bluetoothTx, bluetoothRx);
// BTA
//String BTA = "0006664FDC9E"; 

// Software Version Information
String sver = "26-22";

void loop() {

  // isBluetooth
  isBluetooth();
 
}

getBluetooth.ino

// Bluetooth
// Setup Bluetooth
void isSetupBluetooth(){

  // Setup Bluetooth
  // Begin the serial monitor at 9600bps
  Serial.begin(9600);
  // Bluetooth
  // The Bluetooth Mate defaults to 115200bps
  bluetooth.begin(115200);
  // Print three times individually
  bluetooth.print("$");
  bluetooth.print("$");
  bluetooth.print("$");
  // Enter command mode
  // Short delay, wait for the Mate to send back CMD
  delay(100);
  // Temporarily Change the baudrate to 9600, no parity
  bluetooth.println("U,9600,N");
  // 115200 can be too fast at times for NewSoftSerial to relay the data reliably
  // Start bluetooth serial at 9600
  bluetooth.begin(9600);
  
}
// isBluetooth
void isBluetooth() {

  // If the bluetooth sent any characters
  if(bluetooth.available())
  {
    
    // Send any characters the bluetooth prints to the serial monitor
    Serial.print((char)bluetooth.read());
    
  }
  // If stuff was typed in the serial monitor
  if(Serial.available())
  {
    
    // Send any characters the Serial monitor prints to the bluetooth
    bluetooth.print((char)Serial.read());
    
  }

}

setup.ino

// Setup
void setup()
{
  
  // Setup Bluetooth
  isSetupBluetooth();

}

——

People can contact us: https://www.donluc.com/?page_id=1927

Technology Experience

  • Programming Language
  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc…)
  • IoT
  • Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
  • Robotics
  • Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
  • Unmanned Vehicles Terrestrial and Marine
  • Machine Learning
  • RTOS
  • Research & Development (R & D)

Instructor, E-Mentor, STEAM, and Arts-Based Training

  • Programming Language
  • IoT
  • PIC Microcontrollers
  • Arduino
  • Raspberry Pi
  • Espressif
  • Robotics

Follow Us

Luc Paquin – Curriculum Vitae – 2023
https://www.donluc.com/luc/

Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/

Don Luc

Project #26 – Radio Frequency – Bluetooth SparkFun Thing Plus – ESP32 WROOM – Mk20

——

#DonLucElectronics #DonLuc #RadioFrequency #Bluetooth #SparkFun #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

SparkFun Thing Plus - ESP32 WROOM

——

SparkFun Thing Plus - ESP32 WROOM

——

SparkFun Thing Plus - ESP32 WROOM

——

SparkFun Thing Plus – ESP32 WROOM

The SparkFun ESP32 Thing Plus is the next step to get started with Espressif IoT ideations while still enjoying all the amenities of the original ESP32 Thing. Espressif’s ESP32 WROOM is a powerful WiFi and Bluetooth MCU module that targets a wide variety of applications. At the core of this module is the ESP32-D0WDQ6 chip which is designed to be both scalable and adaptive. To make the Thing Plus even easier to use, we’ve moved a few pins around to make the board Feather compatible and it utilizes our handy Qwiic Connect System which means no soldering or shields are required to connect it to the rest of your system.

The ESP32 Thing plus integrates a rich set of peripherals, ranging from capacitive touch sensors, SD card interface, Ethernet, high-speed SPI, UART, I2S and I2C. Thanks to the onboard ESP32 WROOM module, the SparkFun Thing Plus features 16MB of flash memory, 520kB of internal SRAM, an integrated 802.11 BGN WiFi transceiver and dual-mode Bluetooth capabilities, and a JST connector to plug in a LiPo battery.

DL2307Mk01

1 x Arduino Uno
1 x SparkFun Thing Plus – ESP32 WROOM
1 x SparkFun Bluetooth Mate Silver
2 x SparkFun Cerberus USB Cable

Arduino Uno

RX – Digital 3
TX – Digital 2
VIN – +3.3V
GND – GND

——

DL2307Mk01pr.ino

/* ***** Don Luc Electronics © *****
Software Version Information
Project #26 - Radio Frequency - Bluetooth SparkFun Thing Plus - ESP32 WROOM - Mk20
26-20
DL2307Mk01pr.ino
1 x Arduino Uno
1 x SparkFun Thing Plus - ESP32 WROOM
2 x SparkFun Bluetooth Mate Silver
2 x SparkFun Cerberus USB Cable
*/

// Include the Library Code
// Software Serial
#include <SoftwareSerial.h>

// Software Serial
// TX-O pin of bluetooth mate, Arduino D2
int bluetoothTx = 2;
// RX-I pin of bluetooth mate, Arduino D3
int bluetoothRx = 3;
// Bluetooth
SoftwareSerial bluetooth(bluetoothTx, bluetoothRx);

// Software Version Information
String sver = "26-20";

void loop() {

  // isBluetooth
  isBluetooth();
 
}

getBluetooth.ino

// Bluetooth
// Setup Bluetooth
void isSetupBluetooth(){

  // Setup Bluetooth
  // Begin the serial monitor at 9600bps
  Serial.begin(9600);
  // Bluetooth
  // The Bluetooth Mate defaults to 115200bps
  bluetooth.begin(115200);
  
  // Print three times individually
  bluetooth.print("$");
  bluetooth.print("$");
  bluetooth.print("$");
  // Enter command mode
  // Short delay, wait for the Mate to send back CMD
  delay(100);
  // Temporarily Change the baudrate to 9600, no parity
  bluetooth.println("U,9600,N");
  // 115200 can be too fast at times for NewSoftSerial to relay the data reliably
  // Start bluetooth serial at 9600
  bluetooth.begin(9600);
  
}
// isBluetooth
void isBluetooth() {

  // If the bluetooth sent any characters
  if(bluetooth.available())
  {
    
    // Send any characters the bluetooth prints to the serial monitor
    Serial.print((char)bluetooth.read());
    
  }
  // If stuff was typed in the serial monitor
  if(Serial.available())
  {
    
    // Send any characters the Serial monitor prints to the bluetooth
    bluetooth.print((char)Serial.read());
    
  }

}

setup.ino

// Setup
void setup()
{
  
  // Setup Bluetooth
  isSetupBluetooth();

}

——

SparkFun Thing Plus – ESP32 WROOM

RX2 – Bluetooth
TX2 – Bluetooth
VIN – +3.3V
GND – GND

——

DL2307Mk01ps.ino

/* ***** Don Luc Electronics © *****
Software Version Information
Project #26 - Radio Frequency - Bluetooth SparkFun Thing Plus - ESP32 WROOM  - Mk20
26-20
DL2307Mk01pr.ino
1 x Arduino Uno
1 x SparkFun Thing Plus - ESP32 WROOM
2 x SparkFun Bluetooth Mate Silver
2 x SparkFun Cerberus USB Cable
*/

// Include the Library Code
// Bluetooth Serial
#include "BluetoothSerial.h"
#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it
#endif

// Bluetooth Serial
BluetoothSerial SerialBT;

// Software Version Information
String sver = "26-20";

void loop() {

  // isBluetooth
  isBluetooth();

}

getBluetooth.ino

// Bluetooth
// Setup Bluetooth
void isSetupBluetooth(){

  // Serial Begin
  Serial.begin(9600);
  
  // Bluetooth device name
  SerialBT.begin("DL2307Mk01ps");
  
  // Serial
  Serial.println("The device started, now you can pair it with bluetooth!");
  
}
// isBluetooth
void isBluetooth() {

  // If stuff was typed in the serial monitor
  if (Serial.available()) {
    
    // Send any characters the Serial monitor prints to the bluetooth
    SerialBT.write(Serial.read());
    
  }
  // If the bluetooth sent any characters
  if (SerialBT.available()) {
    
    // Send any characters the bluetooth prints to the serial monitor
    Serial.write(SerialBT.read());
    
  }
  // Delay
  delay(20);

}

setup.ino

// Setup
void setup()
{
  
  // Setup Bluetooth
  isSetupBluetooth();

}

——

People can contact us: https://www.donluc.com/?page_id=1927

Technology Experience

  • Programming Language
  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc…)
  • IoT
  • Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
  • Robotics
  • Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
  • Unmanned Vehicles Terrestrial and Marine
  • Machine Learning
  • RTOS
  • Research & Development (R & D)

Instructor, E-Mentor, STEAM, and Arts-Based Training

  • Programming Language
  • IoT
  • PIC Microcontrollers
  • Arduino
  • Raspberry Pi
  • Espressif
  • Robotics

Follow Us

Luc Paquin – Curriculum Vitae – 2023
https://www.donluc.com/luc/

Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/

Don Luc

Project #26 – Radio Frequency – Bluetooth Commands – Mk19

——

#DonLucElectronics #DonLuc #RadioFrequency #Bluetooth #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

Bluetooth Commands

——

Bluetooth Commands

——

Bluetooth Commands

——

ACTION Commands

Begin by sending the inquiry scan command: I,, to search for other Bluetooth modules in range. The parameter defines the number of seconds the modem will take to look for other modules. It’ll default to 10 if not defined. If you just type “I” and click send, the device should respond with a “Inquiry, COD=0”, and then after ten seconds it’ll respond with any Bluetooth modules it found. It will print their information as “BT address, BT name, COD”.

If the modem finds any modules, you can try sending the connect command: C,

< to connect to one of them. The modem in the example above found one devices in range, by sending the C,0006664FAE18 command, we can attempt to connect to one of them. After sending the connect command, the device will respond with "TRYING", which will be followed by either "CONNECT failed" or the connection will be successful. After a successful connection we immediately enter data mode, and the modem becomes a pipeline. Any characters sent from one Bluetooth device will be sent to the other, and vice-versa. DL2306Mk06

1 x Arduino Uno
1 x SparkFun RedBoard Qwiic
2 x SparkFun Bluetooth Mate Silver
2 x SparkFun Cerberus USB Cable

Arduino Uno

RX – Digital 3
TX – Digital 2
VIN – +3.3V
GND – GND

——

DL2306Mk06pr.ino

/* ***** Don Luc Electronics © *****
Software Version Information
Project #26 - Radio Frequency - Bluetooth Commands - Mk19
26-19
DL2306Mk03pr.ino
1 x Arduino Uno
1 x SparkFun RedBoard Qwiic
2 x SparkFun Bluetooth Mate Silver
2 x SparkFun Cerberus USB Cable
*/

// Include the Library Code
// Software Serial
#include <SoftwareSerial.h>

// Software Serial
// TX-O pin of bluetooth mate, Arduino D2
int bluetoothTx = 2;
// RX-I pin of bluetooth mate, Arduino D3
int bluetoothRx = 3;
// Bluetooth
SoftwareSerial bluetooth(bluetoothTx, bluetoothRx);
// BTA
//String BTA = "0006664FDC9E"; 

// Software Version Information
String sver = "26-19";

void loop() {

  // isBluetooth
  isBluetooth();
 
}

getBluetooth.ino

// Bluetooth
// Setup Bluetooth
void isSetupBluetooth(){

  // Setup Bluetooth
  // Begin the serial monitor at 9600bps
  Serial.begin(9600);
  // Bluetooth
  // The Bluetooth Mate defaults to 115200bps
  bluetooth.begin(115200);
  // Print three times individually
  bluetooth.print("$");
  bluetooth.print("$");
  bluetooth.print("$");
  // Enter command mode
  // Short delay, wait for the Mate to send back CMD
  delay(100);
  // Temporarily Change the baudrate to 9600, no parity
  bluetooth.println("U,9600,N");
  // 115200 can be too fast at times for NewSoftSerial to relay the data reliably
  // Start bluetooth serial at 9600
  bluetooth.begin(9600);
  
}
// isBluetooth
void isBluetooth() {

  // If the bluetooth sent any characters
  if(bluetooth.available())
  {
    
    // Send any characters the bluetooth prints to the serial monitor
    Serial.print((char)bluetooth.read());
    
  }
  // If stuff was typed in the serial monitor
  if(Serial.available())
  {
    
    // Send any characters the Serial monitor prints to the bluetooth
    bluetooth.print((char)Serial.read());
    
  }

}

setup.ino

// Setup
void setup()
{
  
  // Setup Bluetooth
  isSetupBluetooth();

}

——

SparkFun RedBoard Qwiic

RX – Digital 3
TX – Digital 2
VIN – +3.3V
GND – GND

——

DL2306Mk06ps.ino

/* ***** Don Luc Electronics © *****
Software Version Information
Project #26 - Radio Frequency - Bluetooth Commands - Mk19
26-19
DL2306Mk03ps.ino
1 x Arduino Uno
1 x SparkFun RedBoard Qwiic
2 x SparkFun Bluetooth Mate Silver
2 x SparkFun Cerberus USB Cable
*/

// Include the Library Code
// Software Serial
#include <SoftwareSerial.h>

// Software Serial
// TX-O pin of bluetooth mate, Arduino D2
int bluetoothTx = 2;
// RX-I pin of bluetooth mate, Arduino D3
int bluetoothRx = 3;
// Bluetooth
SoftwareSerial bluetooth(bluetoothTx, bluetoothRx);
// BTA
//String BTA = "0006664FAE18"; 

// Software Version Information
String sver = "26-19";

void loop() {

  // isBluetooth
  isBluetooth();
 
}

getBluetooth.ino

// Bluetooth
// Setup Bluetooth
void isSetupBluetooth(){

  // Setup Bluetooth
  // Begin the serial monitor at 9600bps
  Serial.begin(9600);
  // Bluetooth
  // The Bluetooth Mate defaults to 115200bps
  bluetooth.begin(115200);
  // Print three times individually
  bluetooth.print("$");
  bluetooth.print("$");
  bluetooth.print("$");
  // Enter command mode
  // Short delay, wait for the Mate to send back CMD
  delay(100);
  // Temporarily Change the baudrate to 9600, no parity
  bluetooth.println("U,9600,N");
  // 115200 can be too fast at times for NewSoftSerial to relay the data reliably
  // Start bluetooth serial at 9600
  bluetooth.begin(9600);
  
}
// isBluetooth
void isBluetooth() {

  // If the bluetooth sent any characters
  if(bluetooth.available())
  {
    
    // Send any characters the bluetooth prints to the serial monitor
    Serial.print((char)bluetooth.read());
    
  }
  // If stuff was typed in the serial monitor
  if(Serial.available())
  {
    
    // Send any characters the Serial monitor prints to the bluetooth
    bluetooth.print((char)Serial.read());
    
  }

}

setup.ino

// Setup
void setup()
{
  
  // Setup Bluetooth
  isSetupBluetooth();

}

——

People can contact us: https://www.donluc.com/?page_id=1927

Technology Experience

  • Programming Language
  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc…)
  • IoT
  • Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
  • Robotics
  • Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
  • Unmanned Vehicles Terrestrial and Marine
  • Machine Learning
  • RTOS
  • Research & Development (R & D)

Instructor, E-Mentor, STEAM, and Arts-Based Training

  • Programming Language
  • IoT
  • PIC Microcontrollers
  • Arduino
  • Raspberry Pi
  • Espressif
  • Robotics

Follow Us

Luc Paquin – Curriculum Vitae – 2023
https://www.donluc.com/luc/

Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/

Don Luc

Project #26 – Radio Frequency – Bluetooth Moteino – Mk18

——

#DonLucElectronics #DonLuc #RadioFrequency #Bluetooth #Accelerometer #Magnetometer #Gyroscope #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

Bluetooth Moteino

——

Bluetooth Moteino

——

Bluetooth Moteino

——

Moteino

Moteino began as a low power wireless Arduino compatible development platform based on the popular ATmega328p chip used in the Arduino UNO. Moteinos are compatible and can communicate with any other Arduino or development platform that uses the popular HopeRF RFM69 or LoRa transceivers, or even the older RFM12B. Moteino also comes with an optional SPI flash memory chip for wireless programming, or data logging. Moteino was designed to be a compact, highly customizable and affordable development platform, suitable for IoT, home automation and long range wireless projects.

Moteino in RFM12B to rebuild suggests doing as new without completely replacing. I decided to stripped down at RFM12B and rebuild in Bluetooth.

DL2306Mk05

1 x Moteino
1 x SparkFun Bluetooth Mate Silver
1 x SparkFun 9 Degrees of Freedom Breakout – MPU-9150
1 x LED Red
1 x SparkFun FTDI Basic Breakout – 5V
1 x SparkFun Cerberus USB Cable

Moteino

LED – Digital 8
RX – Digital 3
TX – Digital 2
SDA – Analog A4
SCL – Analog A5
VIN – +3.3V
GND – GND

——

DL2306Mk05p.ino

/* ***** Don Luc Electronics © *****
Software Version Information
Project #26 - Radio Frequency - Bluetooth Moteino - Mk18
26-18
DL2306Mk05p.ino
1 x Moteino
1 x SparkFun Bluetooth Mate Silver
1 x SparkFun 9 Degrees of Freedom Breakout - MPU-9150
1 x LED Red
1 x SparkFun FTDI Basic Breakout - 5V
1 x SparkFun Cerberus USB Cable
*/

// Include the Library Code
// Software Serial
#include <SoftwareSerial.h>
// Two Wire Interface (TWI/I2C)
#include <Wire.h>
// I2CDev I2C utilities
#include "I2Cdev.h"
// MPU9150Lib 9-axis fusion
#include "MPU9150Lib.h"
// CalLib magnetometer and accelerometer calibration
#include "CalLib.h"
// Motion Driver InvenSense Embedded SDK v5.1
#include <dmpKey.h>
#include <dmpmap.h>
#include <inv_mpu.h>
#include <inv_mpu_dmp_motion_driver.h>
// EEPROM Magnetometer and Accelerometer data is stored
#include <EEPROM.h>

// the MPU object
MPU9150Lib MPU;
//  MPU_UPDATE_RATE defines the rate (in Hz)
// at which the MPU updates the sensor data and DMP output
#define MPU_UPDATE_RATE  (20)
//  MAG_UPDATE_RATE defines the rate (in Hz) at which the
// MPU updates the magnetometer data
//  MAG_UPDATE_RATE should be less than or equal to the MPU_UPDATE_RATE
#define MAG_UPDATE_RATE  (10)
//  MPU_MAG_MIX defines the influence that the magnetometer has on the yaw output.
//  The magnetometer itself is quite noisy so some mixing with the gyro yaw can help
//  significantly. Some example values are defined below:
// Just use gyro yaw
#define  MPU_MAG_MIX_GYRO_ONLY          0
// Just use magnetometer and no gyro yaw
#define  MPU_MAG_MIX_MAG_ONLY           1
// A good mix value 
#define  MPU_MAG_MIX_GYRO_AND_MAG       10
// mainly gyros with a bit of mag correction
#define  MPU_MAG_MIX_GYRO_AND_SOME_MAG  50
//  MPU_LPF_RATE is the low pas filter rate and can be between 5 and 188Hz
#define MPU_LPF_RATE   5

// This is our earth frame gravity vector - quaternions and vectors
MPUQuaternion gravity;

// Quaternion Result
float Quaternion_X = 0.0;
float Quaternion_Y = 0.0;
float Quaternion_Z = 0.0;

//  SERIAL_PORT_SPEED defines the speed to use for the debug serial port
#define  SERIAL_PORT_SPEED  115200

// Software Serial
// TX-O pin of bluetooth mate, Arduino D2
int bluetoothTx = 2;
// RX-I pin of bluetooth mate, Arduino D3
int bluetoothRx = 3;
// Bluetooth
SoftwareSerial bluetooth(bluetoothTx, bluetoothRx);
// BTA
String BTA = "0006664FAE18";

// LED Red
int iLedRed = 8;

// Variable to calculate frequency
unsigned long curr = 0;
unsigned long last = 0;
unsigned long freq;

// Software Version Information
String sver = "26-18";

void loop() {
  
  // MPU
  isMPU();

}

getMPU.ino

// MPU
// Setup MPU
void isSetupMPU() {

  // MPU
  MPU.init(MPU_UPDATE_RATE, MPU_MAG_MIX_GYRO_AND_MAG, MAG_UPDATE_RATE, MPU_LPF_RATE);     // start the MPU

  // Set up the initial gravity vector for quaternion rotation
  // Max value down the z axis
  gravity[QUAT_W] = 0;
  gravity[QUAT_X] = 0;
  gravity[QUAT_Y] = 0;
  gravity[QUAT_Z] = SENSOR_RANGE;
  
}
// MPU
void isMPU() {

  // Quaternion
  // This is our body frame gravity vector
  MPUQuaternion rotatedGravity;
  // This is the conjugate of the fused quaternion
  MPUQuaternion fusedConjugate;
  // Used in the rotation
  MPUQuaternion qTemp;
  // The accelerations
  MPUVector3 result;

  // Get the latest data
  if (MPU.read()) {
    
    // Need this for the rotation
    MPUQuaternionConjugate(MPU.m_fusedQuaternion, fusedConjugate);
    
    // Rotate the gravity vector into the body frame
    MPUQuaternionMultiply(gravity, MPU.m_fusedQuaternion, qTemp);
    MPUQuaternionMultiply(fusedConjugate, qTemp, rotatedGravity);
    
    // Now subtract rotated gravity from the body accels to get real accelerations.
    // Note that signs are reversed to get +ve acceleration results
    // in the conventional axes.
    // Quaternion Result
    Quaternion_X = -(MPU.m_calAccel[VEC3_X] - rotatedGravity[QUAT_X]);
    Quaternion_Y = -(MPU.m_calAccel[VEC3_Y] - rotatedGravity[QUAT_Y]);
    Quaternion_Z = -(MPU.m_calAccel[VEC3_Z] - rotatedGravity[QUAT_Z]);

    // Variable to calculate frequency
    curr = micros();
    freq = curr - last;
    last = curr;
    // Bluetooth
    Serial.print( "Blue|" + BTA + "|" );
    Serial.print( Quaternion_X );
    Serial.print( "|" );
    Serial.print( Quaternion_Y );
    Serial.print( "|" );
    Serial.print( Quaternion_Z );
    Serial.print( "|" );
    Serial.print( freq );
    Serial.println( "|*" );
    // Send any characters the Serial monitor prints to the bluetooth
    bluetooth.print((char)Serial.read());
   
  }

}

setup.ino

// Setup
void setup()
{
  
  // Serial
  Serial.begin(SERIAL_PORT_SPEED);

  // Bluetooth
  // The Bluetooth Mate defaults to 115200bps
  bluetooth.begin(115200);

  // LED Red
  pinMode(iLedRed, OUTPUT);
  digitalWrite(iLedRed, HIGH);
  
  // Give display time to power on
  delay(100);

  // Wire communicate with I2C / TWI devices
  Wire.begin();

  // Pause
  delay(50);

  // Setup MPU
  isSetupMPU();

}

——

People can contact us: https://www.donluc.com/?page_id=1927

Technology Experience

  • Programming Language
  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc…)
  • IoT
  • Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
  • Robotics
  • Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
  • Unmanned Vehicles Terrestrial and Marine
  • Machine Learning
  • RTOS
  • Research & Development (R & D)

Instructor, E-Mentor, STEAM, and Arts-Based Training

  • Programming Language
  • IoT
  • PIC Microcontrollers
  • Arduino
  • Raspberry Pi
  • Espressif
  • Robotics

Follow Us

Luc Paquin – Curriculum Vitae – 2023
https://www.donluc.com/luc/

Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/

Don Luc

Project #26 – Radio Frequency – Bluetooth MPU-9150 – Mk17

——

#DonLucElectronics #DonLuc #RadioFrequency #Bluetooth #Accelerometer #Magnetometer #Gyroscope #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

Bluetooth MPU-9150

——

Bluetooth MPU-9150

——

Bluetooth MPU-9150

——

MPU-9150

MotionInterface is becoming a “Must-Have” function being adopted by smartphone and tablet manufacturers due to the enormous value it adds to the end user experience. In smartphones, it finds use in applications such as gesture commands for applications and phone control, enhanced gaming, augmented reality, panoramic photo capture and viewing, and pedestrian and vehicle navigation. With its ability to precisely and accurately track user motions, MotionTracking technology can convert handsets and tablets into powerful 3D intelligent devices that can be used in applications ranging from health and fitness monitoring to location-based services. Key requirements for MotionInterface enabled devices are small package size, low power consumption, high accuracy and repeatability, high shock tolerance, and application specific performance programmability, all at a low consumer price point.

DL2306Mk04

1 x Arduino Uno
1 x SparkFun Bluetooth Mate Silver
1 x SparkFun 9 Degrees of Freedom Breakout – MPU-9150
1 x SparkFun Cerberus USB Cable

Arduino Uno

RX – Digital 3
TX – Digital 2
SDA – Analog A4
SCL – Analog A5
VIN – +3.3V
GND – GND

——

DL2306Mk04p.ino

/* ***** Don Luc Electronics © *****
Software Version Information
Project #26 - Radio Frequency - Bluetooth MPU-9150 - Mk17
26-17
DL2306Mk07p.ino
1 x Arduino Uno
1 x SparkFun Bluetooth Mate Silver
1 x SparkFun 9 Degrees of Freedom Breakout - MPU-9150
1 x SparkFun Cerberus USB Cable
*/

// Include the Library Code
// Software Serial
#include <SoftwareSerial.h>
// Two Wire Interface (TWI/I2C)
#include <Wire.h>
// I2CDev I2C utilities
#include "I2Cdev.h"
// MPU9150Lib 9-axis fusion
#include "MPU9150Lib.h"
// CalLib magnetometer and accelerometer calibration
#include "CalLib.h"
// Motion Driver InvenSense Embedded SDK v5.1
#include <dmpKey.h>
#include <dmpmap.h>
#include <inv_mpu.h>
#include <inv_mpu_dmp_motion_driver.h>
// EEPROM Magnetometer and Accelerometer data is stored
#include <EEPROM.h>

// the MPU object
MPU9150Lib MPU;
//  MPU_UPDATE_RATE defines the rate (in Hz)
// at which the MPU updates the sensor data and DMP output
#define MPU_UPDATE_RATE  (20)
//  MAG_UPDATE_RATE defines the rate (in Hz) at which the
// MPU updates the magnetometer data
//  MAG_UPDATE_RATE should be less than or equal to the MPU_UPDATE_RATE
#define MAG_UPDATE_RATE  (10)
//  MPU_MAG_MIX defines the influence that the magnetometer has on the yaw output.
//  The magnetometer itself is quite noisy so some mixing with the gyro yaw can help
//  significantly. Some example values are defined below:
// Just use gyro yaw
#define  MPU_MAG_MIX_GYRO_ONLY          0
// Just use magnetometer and no gyro yaw
#define  MPU_MAG_MIX_MAG_ONLY           1
// A good mix value 
#define  MPU_MAG_MIX_GYRO_AND_MAG       10
// mainly gyros with a bit of mag correction
#define  MPU_MAG_MIX_GYRO_AND_SOME_MAG  50
//  MPU_LPF_RATE is the low pas filter rate and can be between 5 and 188Hz
#define MPU_LPF_RATE   5

// This is our earth frame gravity vector - quaternions and vectors
MPUQuaternion gravity;

// Quaternion Result
float Quaternion_X = 0.0;
float Quaternion_Y = 0.0;
float Quaternion_Z = 0.0;

//  SERIAL_PORT_SPEED defines the speed to use for the debug serial port
#define  SERIAL_PORT_SPEED  115200

// Software Serial
// TX-O pin of bluetooth mate, Arduino D2
int bluetoothTx = 2;
// RX-I pin of bluetooth mate, Arduino D3
int bluetoothRx = 3;
// Bluetooth
SoftwareSerial bluetooth(bluetoothTx, bluetoothRx);
// BTA
String BTA = "0006664FDC9E"; 

// Variable to calculate frequency
unsigned long curr = 0;
unsigned long last = 0;
unsigned long freq;

// Software Version Information
String sver = "26-17";

void loop() {
  
  // MPU
  isMPU();

}

getMPU.ino

// MPU
// Setup MPU
void isSetupMPU() {

  // MPU
  MPU.init(MPU_UPDATE_RATE, MPU_MAG_MIX_GYRO_AND_MAG, MAG_UPDATE_RATE, MPU_LPF_RATE);     // start the MPU

  // Set up the initial gravity vector for quaternion rotation
  // Max value down the z axis
  gravity[QUAT_W] = 0;
  gravity[QUAT_X] = 0;
  gravity[QUAT_Y] = 0;
  gravity[QUAT_Z] = SENSOR_RANGE;
  
}
// MPU
void isMPU() {

  // Quaternion
  // This is our body frame gravity vector
  MPUQuaternion rotatedGravity;
  // This is the conjugate of the fused quaternion
  MPUQuaternion fusedConjugate;
  // Used in the rotation
  MPUQuaternion qTemp;
  // The accelerations
  MPUVector3 result;

  // Get the latest data
  if (MPU.read()) {
    
    // Need this for the rotation
    MPUQuaternionConjugate(MPU.m_fusedQuaternion, fusedConjugate);
    
    // Rotate the gravity vector into the body frame
    MPUQuaternionMultiply(gravity, MPU.m_fusedQuaternion, qTemp);
    MPUQuaternionMultiply(fusedConjugate, qTemp, rotatedGravity);
    
    // Now subtract rotated gravity from the body accels to get real accelerations.
    // Note that signs are reversed to get +ve acceleration results
    // in the conventional axes.
    // Quaternion Result
    Quaternion_X = -(MPU.m_calAccel[VEC3_X] - rotatedGravity[QUAT_X]);
    Quaternion_Y = -(MPU.m_calAccel[VEC3_Y] - rotatedGravity[QUAT_Y]);
    Quaternion_Z = -(MPU.m_calAccel[VEC3_Z] - rotatedGravity[QUAT_Z]);

    // Variable to calculate frequency
    curr = micros();
    freq = curr - last;
    last = curr;
    // Bluetooth
    Serial.print( "Blue|" + BTA + "|" );
    Serial.print( Quaternion_X );
    Serial.print( "|" );
    Serial.print( Quaternion_Y );
    Serial.print( "|" );
    Serial.print( Quaternion_Z );
    Serial.print( "|" );
    Serial.print( freq );
    Serial.println( "|*" );
    // Send any characters the Serial monitor prints to the bluetooth
    bluetooth.print((char)Serial.read());
   
  }

}

setup.ino

// Setup
void setup()
{
  
  // Serial
  Serial.begin(SERIAL_PORT_SPEED);

  // Bluetooth
  // The Bluetooth Mate defaults to 115200bps
  bluetooth.begin(115200);
  
  // Give display time to power on
  delay(100);

  // Wire communicate with I2C / TWI devices
  Wire.begin();

  // Pause
  delay(50);

  // Setup MPU
  isSetupMPU();

}

——

People can contact us: https://www.donluc.com/?page_id=1927

Technology Experience

  • Programming Language
  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc…)
  • IoT
  • Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
  • Robotics
  • Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
  • Unmanned Vehicles Terrestrial and Marine
  • Machine Learning
  • RTOS
  • Research & Development (R & D)

Instructor, E-Mentor, STEAM, and Arts-Based Training

  • Programming Language
  • IoT
  • PIC Microcontrollers
  • Arduino
  • Raspberry Pi
  • Espressif
  • Robotics

Follow Us

Luc Paquin – Curriculum Vitae – 2023
https://www.donluc.com/luc/

Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/

Don Luc

Project #26 – Radio Frequency – Bluetooth Mate Silver – Mk16

——

#DonLucElectronics #DonLuc #RadioFrequency #Bluetooth #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

Bluetooth Mate Silver

——

Bluetooth Mate Silver

——

Bluetooth Mate Silver

——

SparkFun Bluetooth Mate Silver

The Bluetooth Mate is very similar to our BlueSMiRF modem, but it is designed specifically to be used with our Arduino Pros and LilyPad Arduinos. These modems work as a serial (RX/TX) pipe, and are a great wireless replacement for serial cables. Any serial stream from 2400 to 115200bps can be passed seamlessly from your computer to your target.

Bluetooth Mate has the same pin out as the FTDI Basic, and is meant to plug directly into an Arduino Pro, Pro Mini, or LilyPad Mainboard. Because we’ve arranged the pins to do this, you cannot directly plug the Bluetooth Mate to an FTDI Basic board.

The RN-42 is perfect for short range, battery powered applications. The RN-42 uses only 26uA in sleep mode while still being discoverable and connectable. Multiple user configurable power modes allow the user to dial in the lowest power profile for a given application. The Bluetooth Mate has on-board voltage regulators, so it can be powered from any 3.3 to 6VDC power supply. We’ve got level shifting all set up so the RX and TX pins on the remote unit are 3-6VDC tolerant.

DL2306Mk03

1 x Arduino Uno
1 x SparkFun Bluetooth Mate Silver
1 x SparkFun Cerberus USB Cable

Arduino Uno

RX – Digital 3
TX – Digital 2
VIN – +3.3V
GND – GND

——

DL2306Mk03p.ino

/* ***** Don Luc Electronics © *****
Software Version Information
Project #26 - Radio Frequency - Bluetooth Mate Silver - Mk16
26-16
DL2306Mk03p.ino
1 x Arduino Uno
1 x SparkFun Bluetooth Mate Silver
1 x SparkFun Cerberus USB Cable
*/

// Include the Library Code
// Software Serial
#include <SoftwareSerial.h>

// Software Serial
// TX-O pin of bluetooth mate, Arduino D2
int bluetoothTx = 2;
// RX-I pin of bluetooth mate, Arduino D3
int bluetoothRx = 3;
// Bluetooth
SoftwareSerial bluetooth(bluetoothTx, bluetoothRx);
// BTA
//String BTA = "0006664FDC9E"; 

// Software Version Information
String sver = "26-16";

void loop() {

  // isBluetooth
  isBluetooth();
 
}

getBluetooth.ino

// Bluetooth
// Setup Bluetooth
void isSetupBluetooth(){

  // Setup Bluetooth
  // Begin the serial monitor at 9600bps
  Serial.begin(9600);
  // Bluetooth
  // The Bluetooth Mate defaults to 115200bps
  bluetooth.begin(115200);
  // Print three times individually
  bluetooth.print("$");
  bluetooth.print("$");
  bluetooth.print("$");
  // Enter command mode
  // Short delay, wait for the Mate to send back CMD
  delay(100);
  // Temporarily Change the baudrate to 9600, no parity
  bluetooth.println("U,9600,N");
  // 115200 can be too fast at times for NewSoftSerial to relay the data reliably
  // Start bluetooth serial at 9600
  bluetooth.begin(9600);
  
}
// isBluetooth
void isBluetooth() {

  // If the bluetooth sent any characters
  if(bluetooth.available())
  {
    
    // Send any characters the bluetooth prints to the serial monitor
    Serial.print((char)bluetooth.read());
    
  }
  // If stuff was typed in the serial monitor
  if(Serial.available())
  {
    
    // Send any characters the Serial monitor prints to the bluetooth
    bluetooth.print((char)Serial.read());
    
  }

}

setup.ino

// Setup
void setup()
{
  
  // Setup Bluetooth
  isSetupBluetooth();

}

——

People can contact us: https://www.donluc.com/?page_id=1927

Technology Experience

  • Programming Language
  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc…)
  • IoT
  • Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
  • Robotics
  • Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
  • Unmanned Vehicles Terrestrial and Marine
  • Machine Learning
  • RTOS
  • Research & Development (R & D)

Instructor, E-Mentor, STEAM, and Arts-Based Training

  • Programming Language
  • IoT
  • PIC Microcontrollers
  • Arduino
  • Raspberry Pi
  • Espressif
  • Robotics

Follow Us

Luc Paquin – Curriculum Vitae – 2023
https://www.donluc.com/luc/

Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/

Don Luc

Project #12: Robotics – 9DOF – Mk27

——

#DonLucElectronics #DonLuc #Robotics #Magnetometer #Accelerometer #Gyroscope #MicroOLED # #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

9DOF

——

9DOF

——

9DOF

——

SparkFun 9 Degrees of Freedom – Sensor Stick

The SparkFun 9DOF Sensor Stick is a very small sensor board with 9 degrees of freedom. It includes the ADXL345 accelerometer, the HMC5883L magnetometer, and the ITG-3200 MEMS gyro. The “Stick” has a simple I2C interface and a mounting hole for attaching it to your project. Also, the board is a mere allowing it to be easily mounted in just about any application.

DL2305Mk03

1 x SparkFun RedBoard Qwiic
1 x ProtoScrewShield
1 x SparkFun 9 Degrees of Freedom – Sensor Stick
1 x SparkFun Micro OLED Breakout (Qwiic)
1 x Thumb Joystick
1 x SparkFun Thumb Joystick Breakout
2 x Pololu DRV8834 Low-Voltage Stepper Motor Driver Carrier
2 x Electrolytic Decoupling Capacitors – 100uF/25V
2 x Pololu Stepper Motor Bipolar, 2.8V, 1.7 A/Phase
2 x Pololu Universal Aluminum Mounting Hub for 5mm Shaft, M3 Holes
1 x SparkFun Solderable Breadboard – Large
1 x SparkFun Cerberus USB Cable

SparkFun RedBoard Qwiic

SDA – Analog A5
SCL – Analog A4
JH – Analog A0
JV – Analog A1
JS – Digital 2
DIR – Digital 7
SPR – Digital 8
DIL – Digital 9
SPL – Digital 10
LED – Digital 13
VIN – +3.3V
VIN – +5V
GND – GND

——

DL2305Mk03p.ino

/* ***** Don Luc Electronics © *****
Software Version Information
Project #12: Robotics - 9DOF - Mk27
12-27
DL2305Mk03p.ino
1 x SparkFun RedBoard Qwiic
1 x ProtoScrewShield
1 x SparkFun 9 Degrees of Freedom - Sensor Stick
1 x SparkFun Micro OLED Breakout (Qwiic)
1 x Thumb Joystick
1 x SparkFun Thumb Joystick Breakout
2 x Pololu DRV8834 Low-Voltage Stepper Motor Driver Carrier
2 x Electrolytic Decoupling Capacitors - 100uF/25V
2 x Pololu Stepper Motor Bipolar, 2.8V, 1.7 A/Phase
2 x Pololu Universal Aluminum Mounting Hub for 5mm Shaft, M3 Holes
1 x SparkFun Solderable Breadboard - Large
1 x SparkFun Cerberus USB Cable
*/

// Include the Library Code
// Arduino
#include <Arduino.h>
// DRV8834 Stepper Motor Driver
#include <BasicStepperDriver.h>
#include <MultiDriver.h>
// Wire communicate with I2C / TWI devices
#include <Wire.h>
// SparkFun Micro OLED
#include <SFE_MicroOLED.h>
// Accelerometer
#include <ADXL345.h>
// Magnetometer
#include <HMC58X3.h>
// MEMS Gyroscope
#include <ITG3200.h>
// Debug
#include "DebugUtils.h"
// FreeIMU
#include <CommunicationUtils.h>
#include <FreeIMU.h>

// DRV8834 Stepper Motor Driver
// Stepper motor steps per revolution.
// Most steppers are 200 steps or 1.8 degrees/step
#define MOTOR_STEPS 200
// Target RPM for X axis stepper motor
#define MOTOR_X_RPM 800
// Target RPM for Y axis stepper motor
#define MOTOR_Y_RPM 800
// Since microstepping is set externally,
// make sure this matches the selected mode
// If it doesn't, the motor will move at a
// different RPM than chosen
// 1=full step, 2=half step etc.
#define MICROSTEPS 1
// X Stepper motor
#define DIR_X 7
#define STEP_X 8
// Y Stepper motor
#define DIR_Y 9
#define STEP_Y 10
// BasicStepperDriver
BasicStepperDriver stepperX(MOTOR_STEPS, DIR_X, STEP_X);
BasicStepperDriver stepperY(MOTOR_STEPS, DIR_Y, STEP_Y);
// Pick one of the two controllers below
// each motor moves independently
MultiDriver controller(stepperX, stepperY);

// Joystick
#define JH A0
#define JV A1
#define JS 2

// Variable for reading the button
int JSState = 0;
// Adjusted Value
int adjustedValue = 0;
int adjustedValue2 = 0;

// LED Yellow
int iLED = 13;

// SparkFun Micro OLED
#define PIN_RESET 9
#define DC_JUMPER 1
// I2C declaration
MicroOLED oled(PIN_RESET, DC_JUMPER);

// Set the FreeIMU object
FreeIMU my3IMU = FreeIMU();

// Yaw Pitch Roll
float ypr[3];
float Yaw = 0;
float Pitch = 0;
float Roll = 0;

// Software Version Information
String sver = "12-27";

void loop() {
  
  // Button
  isButton();

  // Joystick
  isThumbJoystick();
  
  // Stepper
  isStepper();

  // isFreeIMU
  isFreeIMU();

  // Micro OLED
  isMicroOLED();
 
}

getButton.ino

// Button
// Button Setup
void isButtonSetup() {
  
  // Make the button line an input
  pinMode(JS, INPUT_PULLUP);
  // Initialize digital pin iLED as an output
  pinMode(iLED, OUTPUT);
  
}

// Button
void isButton(){

  // Read the state of the button
  JSState = digitalRead(JS);

  // Check if the button is pressed.
  // If it is, the JSState is HIGH:
  if (JSState == HIGH) {
    
    // Button
    // Turn the LED on HIGH 
    digitalWrite(iLED, HIGH);
    
  } else {
    
    // Button
    // Turn the LED on LOW 
    digitalWrite(iLED, LOW);
    
  }

}

getFreeIMU.ino

// FreeIMU
// isFreeIMUSetup
void isFreeIMUSetup(){

  // Pause
  delay(5);
  // Initialize IMU
  my3IMU.init();
  // Pause
  delay(5);
  
}
// isFreeIMU
void isFreeIMU(){

  // FreeIMU
  // Yaw Pitch Roll
  my3IMU.getYawPitchRoll(ypr);
  // Yaw
  Yaw = ypr[0];
  // Pitch
  Pitch = ypr[1];
  // Roll
  Roll = ypr[2];

}

getMicroOLED.ino

// SparkFun Micro OLED
// Micro OLED Setup
void isMicroOLEDSetup() {

  // Initialize the OLED
  oled.begin();
  // Clear the display's internal memory
  oled.clear(ALL);
  // Display what's in the buffer (Splash Screen SparkFun)
  oled.display();

  // Delay 1000 ms
  delay(1000);

  // Clear the buffer.
  oled.clear(PAGE);
  
}
// Micro OLED
void isMicroOLED() {

  // Text Display FreeIMU
  // Clear the display
  oled.clear(PAGE);
  // Set cursor to top-left
  oled.setCursor(0, 0);
  // Set font to type 0
  oled.setFontType(0);
  // Horizontal
  oled.print("H: ");
  oled.print( adjustedValue );
  // Vertical
  oled.setCursor(0, 11);
  oled.print("V: ");
  oled.print( adjustedValue2 );
  // Yaw
  oled.setCursor(0, 21);
  oled.print("Y: ");
  oled.print(Yaw);
  // Pitch
  oled.setCursor(0, 31);
  oled.print("P: ");
  oled.print(Pitch);
  // Roll
  oled.setCursor(0, 41);
  oled.print("R: ");
  oled.print(Roll);
  oled.display();

}

getStepper.ino

// Stepper
// isStepperSetup
void isStepperSetup() {    
  
  // Set stepper target motors RPM.
  stepperX.begin(MOTOR_X_RPM, MICROSTEPS);
  stepperY.begin(MOTOR_Y_RPM, MICROSTEPS);

}
// Stepper
void isStepper() {

  // Stepper => Controller rotate
  controller.rotate(adjustedValue, adjustedValue2);
  
}

getThumbJoystick.ino

// Thumb Joystick
void isThumbJoystick() {

  // Joystick JH
  // Horizontal
  // Joystick Pot Values JH
  int potValue = analogRead(JH);
  int potValues = 0;
  // Adjusted Value
  potValues = map(potValue, 0, 1023, 1000, -1000);
  if (potValues > 300) {

    adjustedValue = potValues;

  } else if (potValues < -300) {

    adjustedValue = potValues;

  } else {

    adjustedValue = 0;

  }

  // Joystick JV
  // Vertical
  // Joystick Pot Values JV
  int potValue2 = analogRead(JV);
  int potValues2 = 0;
  // Adjusted Value2
  potValues2 = map(potValue2, 0, 1023, 1000, -1000);
  if (potValues2 > 300) {

    adjustedValue2 = potValues2;

  } else if (potValues2 < -300) {

    adjustedValue2 = potValues2;

  } else {

    adjustedValue2 = 0;

  }

}

setup.ino

// Setup
void setup()
{
  
  // Wire communicate with I2C / TWI devices
  Wire.begin();

  // Setup Micro OLED
  isMicroOLEDSetup();

  // isFreeIMUSetup
  isFreeIMUSetup();
   
  // Button Setup
  isButtonSetup();
  
  // DRV8834 Stepper Motor Driver
  isStepperSetup();

}

——

People can contact us: https://www.donluc.com/?page_id=1927

Technology Experience

  • Programming Language
  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc…)
  • IoT
  • Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
  • Robotics
  • Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
  • Unmanned Vehicles Terrestrial and Marine
  • Machine Learning
  • RTOS
  • Research & Development (R & D)

Instructor, E-Mentor, STEAM, and Arts-Based Training

  • Programming Language
  • IoT
  • PIC Microcontrollers
  • Arduino
  • Raspberry Pi
  • Espressif
  • Robotics

Follow Us

Luc Paquin – Curriculum Vitae – 2023
https://www.donluc.com/luc/

Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/

Don Luc

Categories
Archives