BTscope Description
// Arduino Nano example with and HC-05:
// Pinout:
// VCC --> Vin
// TXD --> pin 10
// RXD --> pin 11
// GND --> GND
#include "SoftwareSerial.h"
SoftwareSerial BTSerial(10, 11); // RX | TX
int val = 0; // variable to store the read value
int analogPin = A7; // potentiometer wiper (middle terminal) connected to analog pin 3
void setup() {
BTSerial.begin(9600); // HC-05 default speed in AT command mode
}
void loop() {
static unsigned long previousMillis = 0;
const unsigned long interval = 30; // Set your desired interval in milliseconds
unsigned long currentMillis = millis();
if (currentMillis - previousMillis >= interval) {
previousMillis = currentMillis;
// Your code to read and send data over Bluetooth
val = analogRead(analogPin);
BTSerial.println(val);
}
// Your other non-blocking tasks can go here
// ...
// Avoid using delay() to keep the loop responsive
}
*/
// Pinout:
// VCC --> Vin
// TXD --> pin 10
// RXD --> pin 11
// GND --> GND
#include "SoftwareSerial.h"
SoftwareSerial BTSerial(10, 11); // RX | TX
int val = 0; // variable to store the read value
int analogPin = A7; // potentiometer wiper (middle terminal) connected to analog pin 3
void setup() {
BTSerial.begin(9600); // HC-05 default speed in AT command mode
}
void loop() {
static unsigned long previousMillis = 0;
const unsigned long interval = 30; // Set your desired interval in milliseconds
unsigned long currentMillis = millis();
if (currentMillis - previousMillis >= interval) {
previousMillis = currentMillis;
// Your code to read and send data over Bluetooth
val = analogRead(analogPin);
BTSerial.println(val);
}
// Your other non-blocking tasks can go here
// ...
// Avoid using delay() to keep the loop responsive
}
*/
Open up