NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

#include <SPI.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
#include <TinyGPS++.h>
#include <BME280I2C.h>
#include <Wire.h>
#include <MPU6050_light.h>
#define SEALEVELPRESSURE_HPA (1013.25)
#define SERIAL_BAUD 115200
#include <nRF24L01.h>
#include <RF24.h>
#include <RF24_config.h>
RF24 transmit(PB0,PA4);
const uint64_t pipe = 0xE8E8F0F0E1LL;
BME280I2C bme;
TinyGPSPlus gps;
MPU6050 mpu(Wire);
long timer = 0;
struct package {
float gyro_x=0;
float gyro_y=0;
float gyro_z=0;
float sicaklik=0;
float nem=0;
float basinc=0;
float enlem=0;
float boylam=0;
float hiz=0;};

typedef struct package Package;
Package data;
void setup()
{
Serial1.begin(9600);
Serial2.begin(9600);
Serial3.begin(9600);
Serial.begin(SERIAL_BAUD);
while(!Serial) {}
Wire.begin();
byte status = mpu.begin();
Serial.print(F("MPU6050 status: "));
Serial.println(status);
transmit.begin();
transmit.openWritingPipe(pipe);
transmit.setPALevel(RF24_PA_MAX);
transmit.setDataRate(RF24_250KBPS);
transmit.setChannel(100);
transmit.stopListening();
while(!bme.begin())
{
Serial.println("Could not find BME280 sensor!");
delay(1000);
}
Serial1.println();
pinMode(PA8,OUTPUT);
}
void loop()
{ transmit.write(&data, sizeof(data));
while (Serial2.available() > 0)
if (gps.encode(Serial2.read()))
{
mpu.update();
veri(&Serial);
delay(500);
}
if (millis() > 5000 && gps.charsProcessed() < 10)
{
Serial1.println(F("No GPS detected: check wiring."));
while(true);
}
}
void veri// ölçüm değerlerinin yazdıran fonksiyon
(
Stream* client
)
{
float temp(NAN), hum(NAN), pres(NAN);
Serial.print("ENLEM: ");
Serial.println(gps.location.lat(), 6);
Serial.print("BOYLAM: ");
Serial.println(gps.location.lng(), 6);
Serial.print("HIZ: ");
Serial.println(gps.speed.kmph());
delay(1000);
BME280::TempUnit tempUnit(BME280::TempUnit_Celsius);
BME280::PresUnit presUnit(BME280::PresUnit_Pa);
bme.read(pres, temp, hum, tempUnit, presUnit);
client->print("Temp: ");
client->print(temp);
client->print("°"+ String(tempUnit == BME280::TempUnit_Celsius ? 'C' :'F'));
client->print("ttHumidity: ");
client->print(hum);
client->print("% RH");
client->print("ttPressure: ");
client->print(pres);
client->println("Pa");
delay(1000);

Serial.print(F("GYRO X: "));Serial.print(mpu.getGyroX());
Serial.print("tY: ");Serial.print(mpu.getGyroY());
Serial.print("tZ: ");Serial.println(mpu.getGyroZ());

Serial.print(F("İVME AÇISI X: "));Serial.print(mpu.getAccAngleX());
Serial.print("tY: ");Serial.println(mpu.getAccAngleY());

Serial.print(F("AÇI X: "));Serial.print(mpu.getAngleX());
Serial.print("tY: ");Serial.print(mpu.getAngleY());
Serial.print("tZ: ");Serial.println(mpu.getAngleZ());
timer = millis();
data.gyro_x=mpu.getGyroX();
data.gyro_y=mpu.getGyroY();
data.gyro_z=mpu.getGyroZ();
data.sicaklik=temp;
data.nem=hum;
data.basinc=pres;
data.enlem=gps.location.lat();
data.boylam=gps.location.lng();
data.hiz=gps.speed.kmph();
if(temp > 23 ){
analogWrite(PA8, 250);
delay(10);}
else {analogWrite(PA8, 0);}
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.