Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
car-controlserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenzhongjian
car-controlserver
Commits
1ed4b4b5
Commit
1ed4b4b5
authored
Feb 11, 2025
by
957dd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
c7b2bfce
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
8 additions
and
9 deletions
+8
-9
Deviceld.txt
Deviceld.txt
+0
-2
main
main
+0
-0
gpio_pwm.c
src/gpio_pwm.c
+4
-4
gpio_pwm.o
src/gpio_pwm.o
+0
-0
mqtt.o
src/mqtt.o
+0
-0
main.c
usr/main.c
+4
-3
main.o
usr/main.o
+0
-0
No files found.
Deviceld.txt
deleted
100644 → 0
View file @
c7b2bfce
controlcars0001
\ No newline at end of file
main
View file @
1ed4b4b5
No preview for this file type
src/gpio_pwm.c
View file @
1ed4b4b5
...
...
@@ -3,8 +3,8 @@
#include <stdlib.h>
// 定义 PWM 引脚的 WiringPi 编号
#define PWM_PIN_SPEED 2
#define PWM_PIN_CHANGE 2
1
#define PWM_PIN_SPEED 2
1
#define PWM_PIN_CHANGE 2
#define SPEED_IN_1 24
#define SPEED_IN_2 26
// 定义 PWM 频率为 50Hz
...
...
@@ -20,8 +20,8 @@ void pwm_speed() {
pinMode
(
PWM_PIN_SPEED
,
PWM_OUTPUT
);
pinMode
(
PWM_PIN_CHANGE
,
PWM_OUTPUT
);
pinMode
(
SPEED_IN_1
,
PWM_
OUTPUT
);
pinMode
(
SPEED_IN_2
,
PWM_
OUTPUT
);
pinMode
(
SPEED_IN_1
,
OUTPUT
);
pinMode
(
SPEED_IN_2
,
OUTPUT
);
pwmSetClock
(
PWM_PIN_SPEED
,
pwm_clock
);
//=19200*1000/(hz*2000)
pwmSetRange
(
PWM_PIN_SPEED
,
MAX_DUTY
);
...
...
src/gpio_pwm.o
View file @
1ed4b4b5
No preview for this file type
src/mqtt.o
View file @
1ed4b4b5
No preview for this file type
usr/main.c
View file @
1ed4b4b5
...
...
@@ -64,11 +64,11 @@ void *AppExit(void *arg)//出现意外自动停止
void
*
Mqttbeat
(
void
*
arg
)
{
printf
(
"Mqttbeat start
\n
"
);
Delay_Ms
(
30
,
0
);
Delay_Ms
(
15
,
0
);
refresh_cam
();
Delay_Ms
(
10
,
0
);
refresh_cam
();
Delay_Ms
(
10
,
0
);
Delay_Ms
(
5
,
0
);
while
(
1
)
{
...
...
@@ -84,7 +84,7 @@ void *Mqttbeat(void *arg)
void
*
opensh
(
void
*
arg
)
{
Delay_Ms
(
10
,
0
);
Delay_Ms
(
5
,
0
);
printf
(
"open cam
\n
"
);
opencamsh
();
//10s后打开火狐游览器并且进入网址
...
...
@@ -153,6 +153,7 @@ int main(int argc, char *argv[]) {
printf
(
"WiringPi setup failed!
\n
"
);
return
1
;
}
pwm_speed
()
;
Delay_Ms
(
10
,
0
);
...
...
usr/main.o
View file @
1ed4b4b5
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment