Initial commits, migrating repo
This commit is contained in:
commit
f5018ec771
30
README.md
Normal file
30
README.md
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
# fosdem-talk
|
||||||
|
|
||||||
|
A FOSDEM talk about the wonders of the amateur radio world. And SDRs and stuff.
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
Outline:
|
||||||
|
Introduction to Amateur Radio:
|
||||||
|
* Brief history of the hobby.
|
||||||
|
|
||||||
|
Communication in Amateur Radio:
|
||||||
|
* Baofeng UV5R(the default radio)
|
||||||
|
* Exploring the various modes of communication, such as voice, Morse code, digital modes, and satellite communication.
|
||||||
|
* Overview of HAM communications - local and global.
|
||||||
|
* Even in the absence of traditional infrastructure during emergencies or natural disasters.
|
||||||
|
* Highlighting the role of amateur radio in providing a platform for international friendships.
|
||||||
|
|
||||||
|
Hardware in Amateur Radio:
|
||||||
|
* Overview of equipment
|
||||||
|
* Discussing the design and construction of homebrew equipment, fostering creativity and technical skills.
|
||||||
|
|
||||||
|
Software in Amateur Radio:
|
||||||
|
* Introducing software applications used for signal processing, digital modes, and satellite tracking.
|
||||||
|
* Discussing the integration of amateur radio with open-source software and its impact.
|
||||||
|
|
||||||
|
Conclusion and Q&A Session:
|
||||||
|
* Highlighting the community-driven nature of amateur radio.
|
||||||
|
* Regulatory aspects and licensing requirements.
|
||||||
|
* Summarizing the key takeaways and the enduring appeal of the amateur radio hobby.
|
||||||
|
* Engaging the audience in a Q&A session to address their queries and encourage further exploration.
|
4
rc-car/.gitignore
vendored
Normal file
4
rc-car/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
_env/
|
||||||
|
old/
|
||||||
|
__pycache__/
|
||||||
|
.ipynb_checkpoints/
|
52
rc-car/RCCar.py
Normal file
52
rc-car/RCCar.py
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
from subprocess import run, DEVNULL
|
||||||
|
from os import path
|
||||||
|
from enum import Enum
|
||||||
|
from time import sleep
|
||||||
|
|
||||||
|
class Direction(Enum):
|
||||||
|
FORWARD = "Forward.complex" # car go vroom vroom random distances
|
||||||
|
BACKWARD = "Back.complex" # same here but backwards
|
||||||
|
LEFT = "Left.complex" # 360 + n*36 degrees at a time
|
||||||
|
RIGHT = "Right.complex" # 360 + n*40 degrees at a time
|
||||||
|
FINE_FORWARD = "Fine_forward.complex" # 30cm
|
||||||
|
FINE_BACKWARD = "Fine_back.complex" # 30~cm
|
||||||
|
|
||||||
|
class RCCar:
|
||||||
|
def __init__(self):
|
||||||
|
self.sample_rate = 2_000_000
|
||||||
|
self.frequency = 27_150_000
|
||||||
|
self.bandwidth = 4_000_000
|
||||||
|
# Get path of current file
|
||||||
|
self.angle = 0
|
||||||
|
self.forward = 0
|
||||||
|
self.backward = 0
|
||||||
|
self.signals = path.dirname(path.realpath(__file__)) + "/signals/"
|
||||||
|
|
||||||
|
def move(self, movement_file) -> str:
|
||||||
|
if movement_file == Direction.LEFT.value:
|
||||||
|
self.angle += 3
|
||||||
|
|
||||||
|
|
||||||
|
silent = run(["hackrf_transfer",
|
||||||
|
"-t", f"{self.signals}{movement_file}",
|
||||||
|
"-f", str(self.frequency),
|
||||||
|
"-s", str(self.sample_rate),
|
||||||
|
"-b", str(self.bandwidth),
|
||||||
|
"-x", "47",
|
||||||
|
|
||||||
|
],
|
||||||
|
stdout = DEVNULL,
|
||||||
|
stderr = DEVNULL
|
||||||
|
|
||||||
|
)
|
||||||
|
return movement_file
|
||||||
|
|
||||||
|
def test_move(self):
|
||||||
|
for direction in Direction:
|
||||||
|
self.move(direction.value)
|
||||||
|
sleep(1)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
car = RCCar()
|
||||||
|
car.test_move()
|
25
rc-car/README.md
Normal file
25
rc-car/README.md
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
## RC-Car
|
||||||
|
This is where I will upload all of the information regarding the RC car hacking.
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="https://media.discordapp.net/attachments/458628210272239626/1121750003669549066/IMG_20230622_162634_514.jpg?width=374&height=664" alt="RC car in the store"/>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
Technical information about the transmitter:
|
||||||
|
* Uses a [YX 4116 21013](https://www.chinaglobalmall.com/products/559732132610) chip.
|
||||||
|
* The board is HY-4T69 40M
|
||||||
|
* Receiver works on 27.15MHz
|
||||||
|
* Transmitter transmits at 29.15
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="https://media.discordapp.net/attachments/458628210272239626/1121750003124281394/IMG_20230623_131159_876.jpg?width=374&height=664" alt="RC car transmitter"/>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
## TODOS
|
||||||
|
* [x] Record
|
||||||
|
* [x] Forward
|
||||||
|
* [x] Backward
|
||||||
|
* [x] Left
|
||||||
|
* [x] Right
|
||||||
|
* [ ] Make a cool demo of fine controls
|
||||||
|
* [ ] Record a cool trick and make it consistent
|
107
rc-car/Untitled1.ipynb
Normal file
107
rc-car/Untitled1.ipynb
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 1,
|
||||||
|
"id": "d9d52021-6ba8-48b2-8a0d-e434635c4085",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"from RCCar import RCCar, Direction"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 2,
|
||||||
|
"id": "8c491527-223f-4acf-af27-bdb49689e576",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Defining the car\n",
|
||||||
|
"car = RCCar()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 3,
|
||||||
|
"id": "1a055dd5-1ff3-446d-a8e6-9217c1183f0f",
|
||||||
|
"metadata": {
|
||||||
|
"scrolled": true
|
||||||
|
},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "stderr",
|
||||||
|
"output_type": "stream",
|
||||||
|
"text": [
|
||||||
|
"call hackrf_set_sample_rate(2000000 Hz/2.000 MHz)\n",
|
||||||
|
"call hackrf_set_baseband_filter_bandwidth(3500000 Hz/3.500 MHz)\n",
|
||||||
|
"call hackrf_set_hw_sync_mode(0)\n",
|
||||||
|
"call hackrf_set_freq(27150000 Hz/27.150 MHz)\n",
|
||||||
|
"Stop with Ctrl-C\n",
|
||||||
|
" 3.9 MiB / 1.000 sec = 3.9 MiB/second, average power -3.6 dBfs\n",
|
||||||
|
" 1.1 MiB / 0.265 sec = 4.2 MiB/second, average power -4.6 dBfs\n",
|
||||||
|
"\n",
|
||||||
|
"Exiting...\n",
|
||||||
|
"Total time: 1.26459 s\n",
|
||||||
|
"hackrf_stop_tx() done\n",
|
||||||
|
"hackrf_close() done\n",
|
||||||
|
"hackrf_exit() done\n",
|
||||||
|
"fclose() done\n",
|
||||||
|
"exit\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"text/plain": [
|
||||||
|
"'Left.complex'"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"execution_count": 3,
|
||||||
|
"metadata": {},
|
||||||
|
"output_type": "execute_result"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"# Moving to the left\n",
|
||||||
|
"car.move(Direction.LEFT.value)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "758b7a2a-53fb-41aa-883c-d32a233cfd3f",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "20d0cd4a-211c-4b29-af95-3a8d270fcc5d",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"kernelspec": {
|
||||||
|
"display_name": "Python 3 (ipykernel)",
|
||||||
|
"language": "python",
|
||||||
|
"name": "python3"
|
||||||
|
},
|
||||||
|
"language_info": {
|
||||||
|
"codemirror_mode": {
|
||||||
|
"name": "ipython",
|
||||||
|
"version": 3
|
||||||
|
},
|
||||||
|
"file_extension": ".py",
|
||||||
|
"mimetype": "text/x-python",
|
||||||
|
"name": "python",
|
||||||
|
"nbconvert_exporter": "python",
|
||||||
|
"pygments_lexer": "ipython3",
|
||||||
|
"version": "3.11.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 5
|
||||||
|
}
|
21
rc-car/moves.py
Normal file
21
rc-car/moves.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
from RCCar import RCCar, Direction
|
||||||
|
from time import sleep
|
||||||
|
|
||||||
|
def u_turn(car: RCCar):
|
||||||
|
print("Moving back...")
|
||||||
|
car.move(Direction.BACKWARD.value)
|
||||||
|
print("Moving forward...")
|
||||||
|
car.move(Direction.FORWARD.value)
|
||||||
|
|
||||||
|
print("Turning left...")
|
||||||
|
for i in range(10):
|
||||||
|
car.move(Direction.LEFT.value)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
car = RCCar()
|
||||||
|
u_turn(car)
|
||||||
|
# 10
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
BIN
rc-car/signals/Back.complex
Normal file
BIN
rc-car/signals/Back.complex
Normal file
Binary file not shown.
BIN
rc-car/signals/Fine_back.complex
Normal file
BIN
rc-car/signals/Fine_back.complex
Normal file
Binary file not shown.
BIN
rc-car/signals/Fine_forward.complex
Normal file
BIN
rc-car/signals/Fine_forward.complex
Normal file
Binary file not shown.
BIN
rc-car/signals/Forward.complex
Normal file
BIN
rc-car/signals/Forward.complex
Normal file
Binary file not shown.
BIN
rc-car/signals/Left.complex
Normal file
BIN
rc-car/signals/Left.complex
Normal file
Binary file not shown.
BIN
rc-car/signals/Right.complex
Normal file
BIN
rc-car/signals/Right.complex
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user