hc-05

how to trim unknown first characters of string in code vision

青春壹個敷衍的年華 提交于 2020-02-23 06:56:05
问题 I set a mega16 (16bit AVR microcontroller) to receive data from the serial port which is connected to Bluetooth module HC-05 for attaining an acceptable number sent by my android app and an android application sends a number in the form of a string array whose maximum length is equal to 10 digits. The problem arrives while receiving data such that one or two unknown characters(?) exist at the beginning of the received string. I have to remove these unknown characters from the beginning of the

Problems with connecting HC-05 Bluetooth module to PC

一曲冷凌霜 提交于 2020-01-16 08:35:42
问题 So i've been trying to connect my HC-05 BT module to PC. I'm sure i connected everything correct, i'm not new with arduino stuff. What i try to do now is i want to communicate with arduino using uart connection via BT. I have arduino leonardo, and here is my code: void setup() { Serial1.begin(9600); pinMode(LED_BUILTIN, OUTPUT); } void loop() { if (Serial1.available()>0) { String ainfo; ainfo = Serial1.readStringUntil('\n'); if (ainfo.equals("ON")) { digitalWrite(LED_BUILTIN, HIGH); Serial1

Digital audio formating

天大地大妈咪最大 提交于 2019-12-11 07:59:07
问题 I have a vectorized wav file with values between -1 and 1, 88,200 samples, 44.1 kHz sampling rate to hear the audio within two seconds. I'd like to send the audio through bluetooth to a bluetooth module, arduino, DAC, and 3.5mm breakout board with earbuds. I am getting crackly audio when I receive it at the end. I tried to recreate this is MATLAB and it turns out to be a combination of the scaling (multiplying + shifting the values over 0) and the sampling rate change due to the receivers. Of