I am trying to replicate Alain's Voltmeter Project that would display multimeter data on a small OLED screen. I have everything all setup except getting data from the multimeter to be read by the Arduino (through serial monitor). I have successfully connected the device and can send and receive data through the serial monitor and a phone app. However, when the multimeter is connected to the bluetooth, it does not show anything on the serial monitor. How can I get the Arduino to read the data sent by the multimeter?
This is the data I'm trying to send to the Arduino.
-
HM10 Bluetooth Module
-
Arduino Pro Micro
-
General Tools Bluetooth Multimeter
Thank you.
#include <SoftwareSerial.h>
SoftwareSerial BTSerial(9, 8); //RX|TX
void setup(){
Serial.begin(9600);
BTSerial.begin(9600); // default baud rate
while(!Serial); //if it is an Arduino Micro
Serial.println("AT commands: ");
}
void loop(){
char val;
val = BTSerial.read();
Serial.print(val);
//read from the HM-10 and print in the Serial
if(BTSerial.available())
Serial.write(BTSerial.read());
//read from the Serial and print to the HM-10
if(Serial.available())
BTSerial.write(Serial.read());
}