Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Lubos Petrovic committed Dec 4, 2020
1 parent e2100ad commit e7618a3
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 17 deletions.
4 changes: 1 addition & 3 deletions BoardM5stackCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ void BoardM5stackCore::mainLoop() {

Board320_240::mainLoop();

/*#define TFCARD_CS_PIN 4
if (!SD.begin(TFCARD_CS_PIN, SPI, 40000000)) {
/* if (!SD.begin(TFCARD_CS_PIN, SPI, 27000000)) {
Serial.println("Card Mount Failed");
return;
}
Expand Down
7 changes: 1 addition & 6 deletions BoardM5stackCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#define USER_SETUP_LOADED 1
#define SPI_FREQUENCY 27000000
#define SPI_TOUCH_FREQUENCY 2500000

#define USER_SETUP_LOADED 1
#define ILI9341_DRIVER
#define M5STACK
Expand All @@ -19,16 +18,12 @@
#define SPI_FREQUENCY 27000000
#define SPI_READ_FREQUENCY 5000000
#define SPEAKER_PIN 25
#define TFCARD_CS_PIN 4

#define BUTTON_LEFT 37
#define BUTTON_MIDDLE 38
#define BUTTON_RIGHT 39

#define SD_CS 4
#define SD_MOSI 23
#define SD_MISO 19
#define SD_SCLK 18

//
#include "BoardInterface.h"
#include "Board320_240.h"
Expand Down
2 changes: 1 addition & 1 deletion CarKiaEniro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <Arduino.h>
#include <stdint.h>
#include <WString.h>
#include <String.h>
#include <string.h>
#include <sys/time.h>
#include "LiveData.h"
#include "CarKiaEniro.h"
Expand Down
2 changes: 1 addition & 1 deletion CarRenaultZoe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <Arduino.h>
#include <stdint.h>
#include <WString.h>
#include <String.h>
#include <string.h>
#include <sys/time.h>
#include "LiveData.h"
#include "CarRenaultZoe.h"
Expand Down
15 changes: 11 additions & 4 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,23 @@ https://docs.google.com/document/d/1nEezrtXY-8X6mQ1hiZVWDjBVse1sXQg1SlnizaRmJwU/

## Installation from sources
- install arduino IDE + ESP32 support
- https://github.com/Bodmer/TFT_eSPI - display library
- Configure TFT eSPI
W:\Documents\Arduino\libraries\TFT_eSP\User_Setup_Select.h

Required libraries

- ArduinoJson
- TFT_eSPI
- ESP32_AnalogWrite
- esp32-micro-sdcard

Configure TFT eSPI

W:\Documents\Arduino\libraries\TFT_eSP\User_Setup_Select.h
```
// Comment
//#include <User_Setup.h> // Default setup is root library folder
// And uncomment
#include <User_Setups/Setup22_TTGO_T4_v1.3.h> // Setup file for ESP32 and TTGO T4 version 1.3
```

My configuration
- Board ESP32 Dev module
- Upload speed 921600
Expand Down
2 changes: 1 addition & 1 deletion LiveData.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <Arduino.h>
#include <stdint.h>
#include <WString.h>
#include <String.h>
#include <string.h>
#include <sys/time.h>
#include <BLEDevice.h>
#include "config.h"
Expand Down
6 changes: 5 additions & 1 deletion build.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

rem slow GUI performance via arduino-cli yet

arduino-cli compile -v -b esp32:esp32:esp32wrover --build-properties build.extra_flags=-BOARD_TTGO_T4=1 -v evDash.ino
rem arduino-cli compile -v -b esp32:esp32:esp32wrover --build-properties build.extra_flags=-BOARD_TTGO_T4=1 -v evDash.ino
rem arduino-cli compile -v -b esp32:esp32:esp32:PSRAM=enabled,PartitionScheme=huge_app,CPUFreq=80 --build-properties build.extra_flags=-BOARD_TTGO_T4=1 -v evDash.ino
rem rduino-cli upload -b esp32:esp32:esp32 -v -p COM6

Expand All @@ -11,4 +11,8 @@ rem arduino-cli upload -v -b esp32:esp32:m5stack-core-esp32 -p COM9
rem arduino-cli compile -v -b esp32:esp32:esp32:PSRAM=enabled,PartitionScheme=huge_app,CPUFreq=80 --build-properties build.extra_flags=-BOARD_M5STACK=1 -v evDash.ino
rem arduino-cli upload -b esp32:esp32:esp32 -v -p COM9

arduino-cli compile -v -b esp32:esp32:esp32wrover -v evDash.ino
arduino-cli upload -b esp32:esp32:esp32wrover -v -p COM8


pause
25 changes: 25 additions & 0 deletions flash_linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

# Setup
# 1. Ensure you have Python 2.7 or 3.4+ installed
# 2. `pip install esptool`
# 3. `sudo usermod -a -G dialout <USERNAME>` // log out and log in is required

# Select distribution:
# TTGO T4
DIST=./dist/ttgo_t4_v13

# or m5stack
DIST=./dist/m5stack_core1

# Set USB port
PORT=/dev/ttyUSB0

esptool.py -p $PORT -b 921600 write_flash \
--flash_mode dio \
--flash_size detect \
--flash_freq 80m \
0xe000 $DIST/boot_app0.bin \
0x1000 $DIST/bootloader_qio_80m.bin \
0x10000 $DIST/evDash.ino.bin \
0x8000 $DIST/evDash.ino.partitions.bin

0 comments on commit e7618a3

Please sign in to comment.