Commit 9137c6da authored by Christian Eichler's avatar Christian Eichler
Browse files

Modify sketch to directly use ESP-IDF

parent 849ff97e
......@@ -13,3 +13,6 @@
[submodule "server/www/assets/apexcharts.js"]
path = server/www/assets/apexcharts.js
url = https://github.com/apexcharts/apexcharts.js.git
[submodule "sketch_timecube/arduino"]
path = timecube/components/arduino
url = https://github.com/espressif/arduino-esp32.git
/***********************************************
* For compatibility with arduino only. *
* Write your code to corresponding .cpp file. *
**********************************************/
cmake_minimum_required(VERSION 3.5)
add_definitions("-DARDUINO=10800")
add_definitions("-DARDUINO_ARCH_ESP32")
add_definitions("-DCONFIG_ARDUHAL_ESP_LOG")
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(timecube)
Subproject commit 8ea12f89f396b0577d18096263b3c7dc1dfeae5b
set(COMPONENT_REQUIRES arduino esp_adc_cal)
set(COMPONENT_SRCS "accelerometer.cpp timecube.cpp")
set(COMPONENT_ADD_INCLUDEDIRS ".")
register_component()
#include <Arduino.h>
#include <WiFi.h>
#include <esp_adc_cal.h>
#include <esp_bt.h>
//#include <esp_bt.h>
#include <esp_wifi.h>
#include <esp_wpa2.h>
#include <esp_sleep.h>
......@@ -9,8 +9,8 @@
#include <driver/rtc_io.h>
#include <driver/adc.h>
#include "../config.h"
#include "accelerometer.h"
#include "config.h"
#include "timelog.h"
#ifdef SERIAL_DEBUG
......@@ -73,7 +73,7 @@ void setup() {
// disable unused components on first start
if(0 == deep_sleep) {
SDBGLN("Powering down BT and ADC...");
esp_bt_controller_disable();
//esp_bt_controller_disable();
adc_power_off();
}
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment