Hi, everyone! I've been doing a rocket flight computer, following this series https://www.youtube.com/playlist?list=PLyV774-3p8348Fl5V6ciIBh0ZA446q93I and adding some new things, one of these things is a HC-05 bluetooth module, which would be responsible for transmit some data in small range. The first version worked well, I used a ATMEGA328p, and how can you see here, a gif and the schematic too ->https://imgur.com/a/FBIUugu<. But now, I'm using the teensy 3.2, everything is working well but the HC-05 is not transmitting the data, it's connecting, but is not showing anything >https://imgur.com/a/N72zAoq<.
Here is the code that I used in both:
Sorry for my english, I'm brazilian. And that is one of my very first post on a forum
Here is the code that I used in both:
Code:
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BMP280.h>
const int MPU=0x68;
Adafruit_BMP280 bmp;
int AcX,AcY,AcZ,Tmp,GyX,GyY,GyZ,bmpTemp,bmpPress,bmpAlt;
void setup()
{
Serial.begin(9600);
Wire.begin();
Wire.beginTransmission(MPU);
Wire.write(0x6B);
//Inicializa o MPU-6050
Wire.write(0);
Wire.endTransmission(true);
if(!bmp.begin(0x76)){
Serial.println(F("O sensor bmp280 não foi identificado!"));
while(1);
}
}
void loop(){
Wire.beginTransmission(MPU);
Wire.write(0x3B);
Wire.endTransmission(false);
Wire.requestFrom(MPU,14,true);
AcX=Wire.read()<<8|Wire.read();
AcY=Wire.read()<<8|Wire.read();
AcZ=Wire.read()<<8|Wire.read();
GyX=Wire.read()<<8|Wire.read();
GyY=Wire.read()<<8|Wire.read();
GyZ=Wire.read()<<8|Wire.read();
bmpTemp=bmp.readTemperature();
bmpPress=bmp.readPressure();
bmpAlt=bmp.readAltitude(1013.25);
Serial.print(" | AcX = "); Serial.print(AcX);
Serial.print(" | AcY = "); Serial.print(AcY);
Serial.print(" | AcZ = "); Serial.print(AcZ);
Serial.print(" | GyX = "); Serial.print(GyX);
Serial.print(" | GyY = "); Serial.print(GyY);
Serial.print(" | GyZ = "); Serial.println(GyZ);
Serial.print(" | Temperature = "); Serial.print(bmpTemp);
Serial.print(" | Pressure = "); Serial.print(bmpPress);
Serial.print(" | Altitude = "); Serial.print(bmpAlt);
delay(300);
}
Sorry for my english, I'm brazilian. And that is one of my very first post on a forum