diff options
| author | Abel Tim <abel@main.home> | 2024-06-02 17:57:32 +0200 |
|---|---|---|
| committer | Abel Tim <abel@main.home> | 2024-06-02 17:57:32 +0200 |
| commit | 6671a64563369d8e3540639753ba64086a75d7a3 (patch) | |
| tree | 7bb8a4dc198773c517ac2148e7e051be1f76aaba /spi_comm/deg_to_byte.py | |
| parent | b6bdab63c9902604a74a7b4b996bdd0dc7614454 (diff) | |
| download | robotica-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.py | 5 |
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 |
