summaryrefslogtreecommitdiff
path: root/spi_comm/deg_to_byte.py
diff options
context:
space:
mode:
authorAbel Tim <abel@main.home>2024-06-02 17:57:32 +0200
committerAbel Tim <abel@main.home>2024-06-02 17:57:32 +0200
commit6671a64563369d8e3540639753ba64086a75d7a3 (patch)
tree7bb8a4dc198773c517ac2148e7e051be1f76aaba /spi_comm/deg_to_byte.py
parentb6bdab63c9902604a74a7b4b996bdd0dc7614454 (diff)
downloadrobotica-6671a64563369d8e3540639753ba64086a75d7a3.tar.gz
robotica-6671a64563369d8e3540639753ba64086a75d7a3.zip
add files
Diffstat (limited to 'spi_comm/deg_to_byte.py')
-rw-r--r--spi_comm/deg_to_byte.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/spi_comm/deg_to_byte.py b/spi_comm/deg_to_byte.py
new file mode 100644
index 0000000..196d4a5
--- /dev/null
+++ b/spi_comm/deg_to_byte.py
@@ -0,0 +1,5 @@
+deg = 40
+sbinary = format(deg, 'b')
+print(sbinary)
+binary = "".join(("01", sbinary))
+print(binary) \ No newline at end of file