mirror of
https://github.com/usatiuk/EggbotWireless.git
synced 2025-10-26 08:47:49 +01:00
use atmega32 to control stepper motors
Signed-off-by: Stepan Usatyuk <usaatyuk@ustk.me>
This commit is contained in:
11
Firmware/commonSrc/Commands.cpp
Normal file
11
Firmware/commonSrc/Commands.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <Arduino.h>
|
||||
|
||||
void bytesToFloat(float *target, byte *val) {
|
||||
memcpy(target, val, 4);
|
||||
return;
|
||||
}
|
||||
|
||||
void floatToBytes(byte *target, float val) {
|
||||
memcpy(target, &val, 4);
|
||||
return;
|
||||
}
|
||||
Reference in New Issue
Block a user