Skip to content

Instantly share code, notes, and snippets.

View dmrburak's full-sized avatar

Burak dmrburak

View GitHub Profile
@Vitorbnc
Vitorbnc / stm32_gpio_registers_and_c_bitwise.md
Created August 17, 2016 01:00
How to set bits in C and write to STM32 GPIO registers using Arduino IDE

STM32duino GPIO Registers and Programming

Bit Setting in C

Setting a bit

Use the bitwise OR operator ( | ) to set a bit.

number |= 1 << x;
@syfluqs
syfluqs / pid_controller.c
Last active December 19, 2023 21:48
A very basic PID controller in C
/*
* pid_controller.c
*
* Created on: Apr 24, 2016
* Author: subham roy
*/
#include "pid_controller.h"
double pid(PID_vars *vars, double current_err) {