This repository provides various examples on Raspberry Pi single board computers written in C programming language.
Bu repository, Raspberry Pi tek kartlı bilgisayarlarda C programlama dilinde yazılmış çeşitli örnekler sunar.
sudo apt-get update
cd ~
git clone https://github.com/OsmanOzcan/Raspberry-Pi-Examples.git
cd /usr/include
git clone https://github.com/wdalmut/libgps.git
cd ~/OsmanOzcan/Raspberry-Pi-Examples/Sensors
gcc adafruitUltimateGPS.c -l gps -lm -o adafruitUltimateGPS
./adafruitUltimateGPS
cd /usr/include
git clone https://github.com/fm4dd/pi-bno055.git
cd ~/OsmanOzcan/Raspberry-Pi-Examples/Sensors
gcc bno055.c /usr/include/pi-bno055/i2c_bno055.c -o bno055
./bno055
cd ~/OsmanOzcan/Raspberry-Pi-Examples/Sensors
gcc gcc ms5611.c -lm -o ms5611
./ms5611
cd ~/OsmanOzcan/Raspberry-Pi-Examples/Sensors/ina219
gcc ina219test.c raspberrypi4b_driver_ina219_interface.c iic.c driver_ina219_basic.c driver_ina219.c -lm -o ina219test
./ina219test
Since raspberry pi does not have an analog pin, analog reading cannot be made. Using rc circuit is one of the ways to make analog reading. This measurement can be made by calculating the charging and discharging time of the capacitor. Also, filter algorithms should be used to block out noises.
Raspberry pi'nin analog pini olmadığı için analog okuma yapılamaz. Analog okuma yapmanın yollarından biri de rc devresi kullanmaktır. Bu ölçüm, kondansatörün şarj ve deşarj süresi hesaplanarak yapılabilir. Ayrıca, gürültüleri engellemek için filtre algoritmaları kullanılmalıdır.
Example wiring (be used LDR as analog sensor)
Örnek devre (analog sensör olarak LDR kullanılmış)
cd ~/OsmanOzcan/Raspberry-Pi-Examples/
gcc readAnalog.c -lwiringPi -o readAnalog
./readAnalog
cd ~
git clone https://github.com/richardghirst/PiBits
cd ~/OsmanOzcan/Raspberry-Pi-Examples/Motors
gcc servoMotor.c -lwiringPi -o servoMotor
./servoMotor
There are two alternative ways.
cd ~/OsmanOzcan/Raspberry-Pi-Examples/Motors/BrushlessMotorPiGpio
gcc brushlessMotorPG.c -lwiringPi -lpigpio -o brushlessMotorPG
./brushlessMotorPG
cd ~
git clone https://github.com/richardghirst/PiBits
cd ~/OsmanOzcan/Raspberry-Pi-Examples/Motors/BrushlessMotorServoBlaster
gcc brushlessMotorSB.c -lwiringPi -o brushlessMotorSB
./brushlessMotorSB
