Browse Source

Add missing include

Thorsten Riess 1 year ago
parent
commit
692d7affff
6 changed files with 18 additions and 8 deletions
  1. 3
    1
      .gitignore
  2. 1
    1
      .idea/misc.xml
  3. 1
    0
      CMakeLists.txt
  4. 2
    4
      README.md
  5. 10
    0
      main/laserpong_main.c
  6. 1
    2
      sdkconfig

+ 3
- 1
.gitignore View File

@@ -137,4 +137,6 @@ fabric.properties
137 137
 *.old
138 138
 
139 139
 # build
140
-/build
140
+/build
141
+
142
+/refs

+ 1
- 1
.idea/misc.xml View File

@@ -1,4 +1,4 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <project version="4">
3
-  <component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
3
+  <component name="CMakeWorkspace" IGNORE_OUTSIDE_FILES="true" PROJECT_DIR="$PROJECT_DIR$" />
4 4
 </project>

+ 1
- 0
CMakeLists.txt View File

@@ -68,6 +68,7 @@ foreach (component ${COMPONENTS})
68 68
 endforeach()
69 69
 list(REMOVE_DUPLICATES INCLUDE_DIRS)
70 70
 include_directories(${INCLUDE_DIRS})
71
+include_directories(${IDF_PATH}/components/soc/esp32/include)
71 72
 include_directories("build/include")
72 73
 #include_directories("components/arduino-esp32/cores/esp32/")
73 74
 #include_directories("components/OneWire/")

+ 2
- 4
README.md View File

@@ -1,5 +1,3 @@
1
-# Hello World Example
1
+# Laser Pong
2 2
 
3
-Starts a FreeRTOS task to print "Hello World"
4
-
5
-See the README.md file in the upper level 'examples' directory for more information about examples.
3
+ESP32 code to control 2 servos which draw (part of) a PONG game.

+ 10
- 0
main/laserpong_main.c View File

@@ -17,6 +17,14 @@ void app_main()
17 17
 {
18 18
     printf("Hello world!\n");
19 19
 
20
+    /*
21
+     * According to the data sheet, the SG90 9g micro servos
22
+     * operate at 0.1s / 60deg
23
+     * and require a pwm signal at 50Hz
24
+     * with duty length of "about" 1.0 - 1.5 - 2.0 ms
25
+     * for all the way left, center, all the way right
26
+     */
27
+
20 28
     ledc_timer_config_t timer_conf;
21 29
     timer_conf.duty_resolution = LEDC_TIMER_15_BIT;
22 30
     timer_conf.freq_hz = 50;
@@ -33,6 +41,8 @@ void app_main()
33 41
     ledc_conf.timer_sel = LEDC_TIMER_0;
34 42
     ledc_channel_config(&ledc_conf);
35 43
 
44
+    LEDC_CHANNEL_1
45
+
36 46
     /* Print chip information */
37 47
     esp_chip_info_t chip_info;
38 48
     esp_chip_info(&chip_info);

+ 1
- 2
sdkconfig View File

@@ -20,8 +20,7 @@ CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y
20 20
 CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG=
21 21
 CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE=
22 22
 CONFIG_LOG_BOOTLOADER_LEVEL=3
23
-CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V=
24
-CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y
23
+CONFIG_BOOTLOADER_VDDSDIO_BOOST=y
25 24
 
26 25
 #
27 26
 # Security features

Loading…
Cancel
Save