Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leech001/hcs301
STM32 HAL library for reading code from HCS301 433Mhz Keeloq
https://github.com/leech001/hcs301
433mhz barrier-gate hal hcs301 keeloq radio-control radio-frequency stm32
Last synced: about 2 months ago
JSON representation
STM32 HAL library for reading code from HCS301 433Mhz Keeloq
- Host: GitHub
- URL: https://github.com/leech001/hcs301
- Owner: leech001
- License: gpl-3.0
- Created: 2019-11-18T18:51:40.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-02T14:06:37.000Z (over 4 years ago)
- Last Synced: 2023-03-03T21:14:18.549Z (almost 2 years ago)
- Topics: 433mhz, barrier-gate, hal, hcs301, keeloq, radio-control, radio-frequency, stm32
- Language: C
- Size: 412 KB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## A simple C library (STM32 HAL) for reading and sending code for HCS301 433Mhz Keeloq 66 bit.
### This library use for control automation garage door and road barriers.
### Receive code
#### Config you RX433 PIN with "GPIO_EXTI":
- External Interrupt Mode with Rising/Falling edge trigger detection;
- No pull up no pull down.and add NVIC global interrupt for you RXPIN.
Copy the library header and source file to the appropriate project directories (Inc, Src).
Config you RX433 and TX433 PORT and PIN on hcs301.h file
```
#define RX_PORT You_RX_GPIO_Port
#define RX_PIN You_Rx_Pin
```
In the main file of your project (main.c), include the header files.Micros library download from https://github.com/leech001/micros
```
/ * USER CODE BEGIN Includes * /
#include "micros.h"
#include "hcs301.h"
/ * USER CODE END Includes * /
```add HCS301 structure to the section
```
/ * USER CODE BEGIN PV * /
HCS301_t hcs301;
/ * USER CODE END PV * /
```
add RX433 receive interrupt
```
/* USER CODE BEGIN 0 */
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) {
if (GPIO_Pin == You_Rx_Pin){
HCS301_Int()
}
}
/* USER CODE END 0 */
```
add in main function section for initial initialization of the DWT (Data Watchpoint and Trace unit) (https://github.com/leech001/micros)
```
/ * USER CODE BEGIN 2 * /
DWT_Init();
/ * USER CODE END 2 * /
```
On this project setup is ready.
After starting the program, information from RX433(HCS301) will be available through the hcs301 structure
```
...
hcs301.SerialNum
...
```## Send code
#### Config you TX433 PIN with "Output Push Pull":
- Speed Very High;
- No pull up no pull down.
Copy the library header and source file to the appropriate project directories (Inc, Src).Config you RX433 and TX433 PORT and PIN on hcs301.h file
```
#define TX_PORT You_TX_GPIO_Port
#define TX_PIN You_TX_Pin
```
In the main file of your project (main.c), include the header files.Micros library download from https://github.com/leech001/micros
```
/ * USER CODE BEGIN Includes * /
#include "micros.h"
#include "hcs301.h"
/ * USER CODE END Includes * /
```
#### For send code HCS301 use function
```
HCS301_Send(you_code);
```