Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlatformIO and some refactors #12

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
209 changes: 209 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
# File created using '.gitignore Generator' for Visual Studio Code: https://bit.ly/vscode-gig

# Created by https://www.toptal.com/developers/gitignore/api/windows,visualstudiocode,c,c++,kicad,platformio,sublimetext
# Edit at https://www.toptal.com/developers/gitignore?templates=windows,visualstudiocode,c,c++,kicad,platformio,sublimetext

### C ###
# Prerequisites
*.d

# Object files
*.o
*.ko
*.obj
*.elf

# Linker output
*.ilk
*.map
*.exp

# Precompiled Headers
*.gch
*.pch

# Libraries
*.lib
*.a
*.la
*.lo

# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib

# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex

# Debug files
*.dSYM/
*.su
*.idb
*.pdb

# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf

### C++ ###
# Prerequisites

# Compiled Object files
*.slo

# Precompiled Headers

# Compiled Dynamic libraries

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai

# Executables

### KiCad ###
# For PCBs designed using KiCad: https://www.kicad.org/
# Format documentation: https://kicad.org/help/file-formats/

# Temporary files
*.000
*.bak
*.bck
*.kicad_pcb-bak
*.kicad_sch-bak
*-backups
*.kicad_prl
*.sch-bak
*~
_autosave-*
*.tmp
*-save.pro
*-save.kicad_pcb
fp-info-cache

# Netlist files (exported from Eeschema)
*.net

# Autorouter files (exported from Pcbnew)
*.dsn
*.ses

# Exported BOM files
*.xml
*.csv

### KiCad Patch ###
rescue-backup/

*.tsv
bom/

# Gerber export output
out/

### PlatformIO ###
.pioenvs
.piolibdeps
.clang_complete
.gcc-flags.json
.pio

### SublimeText ###
# Cache files for Sublime Text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache

# Workspace files are user-specific
*.sublime-workspace

# Project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using Sublime Text
# *.sublime-project

# SFTP configuration file
sftp-config.json
sftp-config-alt*.json

# Package control specific files
Package Control.last-run
Package Control.ca-list
Package Control.ca-bundle
Package Control.system-ca-bundle
Package Control.cache/
Package Control.ca-certs/
Package Control.merged-ca-bundle
Package Control.user-ca-bundle
oscrypto-ca-bundle.crt
bh_unicode_properties.cache

# Sublime-github package stores a github token in this file
# https://packagecontrol.io/packages/sublime-github
GitHub.sublime-settings

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide

# Support for Project snippet scope

### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

# End of https://www.toptal.com/developers/gitignore/api/windows,visualstudiocode,c,c++,kicad,platformio,sublimetext

# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)

5 changes: 5 additions & 0 deletions Code/ToshibaAir/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.pio
.vscode/.browse.c_cpp.db*
.vscode/c_cpp_properties.json
.vscode/launch.json
.vscode/ipch
10 changes: 10 additions & 0 deletions Code/ToshibaAir/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
],
"unwantedRecommendations": [
"ms-vscode.cpptools-extension-pack"
]
}
9 changes: 9 additions & 0 deletions Code/ToshibaAir/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"files.associations": {
"Dockerfile-*": "dockerfile",
"*.h": "cpp",
"*.jsx": "javascriptreact",
"chrono": "cpp",
"mutex": "cpp"
}
}
62 changes: 62 additions & 0 deletions Code/ToshibaAir/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Toshiba Air Conditioner
---

## ChangeLog

* 01-04-2022 **migrate project to PlatformIO**
* 04-02-2022 **finally fixed websocket problem**
* 04-01-2022 **spiffs -> littlefs**
* 07-12-2021 **fixed query_sensors**
* 18-11-2021 **power consumption**
* 14-01-2021 **sensor info, to, tcj , ...**
* 04-01-2021 **pre-heat detection**
* 02-12-2020 **add min/max**
* 01-11-2020 **fix bmp180 not connected**
* 01-10-2020 **bmp180 support adds pressure**
* 05-09-2020 **fix temp, fix heat mode**
* 27-08-2020 **temperature graph**
* 15-07-2020 **Websockets**
* 01-06-2020 **initial version**

---

## Instructions:
### Hardware
- R/W circuit (see [README.md](../../README.md))
- DHT is connected to D3 (not necessary)
- BMP180 connected to D1 (SCL) D2 (SDA) (not necessary)
- Software serial rx on D7, tx on D8 Wemos mi
### Software

**Prerequitites: [Install PlatformIO Extension for VSCode](https://platformio.org/install/ide?install=vscode)**
</br>

- Open :open_file_folder: project throught **PlatformIO**

<img align="center" src="doc/open_project.png" />

</br>
</br>


- Upload :arrow_up: data directory with the task **Upload Filesystem Image** it with USB for the first time. Then,installed you can use OTA updates.

<img align="center" src="doc/upload_fs.png" />

</br>
</br>

- You can use the serial monitor :computer:

<img align="center" src="doc/serial_mon.png" />

</br>

---
## References:

https://github.com/tttapa/ESP8266/

https://github.com/luisllamasbinaburo/ESP8266-Examples

https://diyprojects.io/esp8266-web-server-part-5-add-google-charts-gauges-and-charts/#.X0gBsIbtY5k
File renamed without changes.
File renamed without changes.
Loading