-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
format lib, add makedir, change dir, delete and list
- Loading branch information
Showing
11 changed files
with
3,516 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Prerequisites | ||
*.d | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
*.smod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
|
||
# PlatformIO | ||
.pio | ||
.pioenvs | ||
.piolibdeps | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Continuous Integration (CI) is the practice, in software | ||
# engineering, of merging all developer working copies with a shared mainline | ||
# several times a day < https://docs.platformio.org/page/ci/index.html > | ||
# | ||
# Documentation: | ||
# | ||
# * Travis CI Embedded Builds with PlatformIO | ||
# < https://docs.travis-ci.com/user/integration/platformio/ > | ||
# | ||
# * PlatformIO integration with Travis CI | ||
# < https://docs.platformio.org/page/ci/travis.html > | ||
# | ||
# * User Guide for `platformio ci` command | ||
# < https://docs.platformio.org/page/userguide/cmd_ci.html > | ||
# | ||
|
||
language: python | ||
python: | ||
- "2.7" | ||
|
||
sudo: false | ||
cache: | ||
directories: | ||
- "~/.platformio" | ||
|
||
env: | ||
- PLATFORMIO_CI_SRC=examples/upload_image/upload_image.ino | ||
|
||
install: | ||
- pip install -U platformio | ||
- platformio update | ||
|
||
script: | ||
- platformio ci --lib="." --board=esp32cam |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,21 @@ | ||
# FTP Client for the ESP32 | ||
An FTP-Client for the ESP32 | ||
|
||
At the moment it is only possible to upload data via FTP, because | ||
this was my main usecase. | ||
I used this client to write sensordata into a log file and to upload | ||
images for my rabbit-webcam. | ||
A FTP-Client for the ESP32 | ||
|
||
You can create files or append data to files on your FTP-Server. | ||
[![GitHub version](https://img.shields.io/github/release/ldab/ESP32_FTPClient.svg)](https://github.com/ldab/ESP32_FTPClient/releases/latest) | ||
[![Build Status](https://travis-ci.org/ldab/ESP32_FTPClient.svg?branch=master)](https://travis-ci.org/ldab/ESP32_FTPClient) | ||
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/ldab/ESP32_FTPClient/blob/master/LICENSE) | ||
|
||
[![GitHub last commit](https://img.shields.io/github/last-commit/ldab/ESP32_FTPClient.svg?style=social)](https://github.com/ldab/ESP32_FTPClient) | ||
|
||
* The main purpose of this library was to upload pictures from ESP32-CAM to a website making the picture available on a http url, as seen here [https://github.com/ldab/ESP32-CAM-Picture-Sharing](https://github.com/ldab/ESP32-CAM-Picture-Sharing), making it usuable on `Blynk` or on your webiste. | ||
|
||
## TODO | ||
|
||
[ ] - List Dir contents test with different serves; | ||
[ ] - Implement download; | ||
|
||
* For the uploading example we will use the GitHub Octocat, which binary file is [here](./src/octocat.h): | ||
![GitHub Octocat](https://github.githubassets.com/images/modules/logos_page/Octocat.png) | ||
|
||
* Originally forked from [https://github.com/blackcodetavern/ESP32_FTPClient](https://github.com/blackcodetavern/ESP32_FTPClient) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/****************************************************************************** | ||
ESP32-CAM remote image access via FTP. Take pictures with ESP32 and upload it via FTP making it accessible for the outisde network. | ||
Leonardo Bispo | ||
July - 2019 | ||
https://github.com/ldab/ESP32_FTPClient | ||
Distributed as-is; no warranty is given. | ||
******************************************************************************/ | ||
|
||
#include <WiFi.h> | ||
#include <WiFiClient.h> | ||
#include <ESP32_FTPClient.h> | ||
#include "octocat.h" | ||
|
||
#define WIFI_SSID "" | ||
#define WIFI_PASS "" | ||
|
||
char ftp_server[] = "ftp.drivehq.com"; | ||
char ftp_user[] = ""; | ||
char ftp_pass[] = ""; | ||
|
||
ESP32_FTPClient ftp (ftp_server,ftp_user,ftp_pass); | ||
|
||
void setup() | ||
{ | ||
Serial.begin( 115200 ); | ||
|
||
WiFi.begin( WIFI_SSID, WIFI_PASS ); | ||
|
||
Serial.println("Connecting Wifi..."); | ||
while (WiFi.status() != WL_CONNECTED) { | ||
delay(500); | ||
Serial.print("."); | ||
} | ||
Serial.println(""); | ||
Serial.print("IP address: "); | ||
Serial.println(WiFi.localIP()); | ||
|
||
ftp.OpenConnection(); | ||
|
||
// Get directory contentx | ||
ftp.InitFile("Type A"); | ||
char list[256]; | ||
ftp.ContentList("/My Pictures/", list); | ||
Serial.print("\nDirectory info: "); | ||
Serial.println(list); | ||
ftp.CloseFile(); | ||
|
||
// Make a new directory | ||
ftp.InitFile("Type A"); | ||
ftp.MakeDir("/jagua"); | ||
ftp.CloseFile(); | ||
|
||
// Create the new file and send the image | ||
ftp.InitFile("Type A"); | ||
ftp.ChangeWorkDir("/wwwhome/images"); | ||
ftp.NewFile("octocat.png"); | ||
ftp.WriteData( octocat_pic, sizeof(octocat_pic) ); | ||
ftp.CloseFile(); | ||
|
||
// Create the file new and write a string into it | ||
ftp.InitFile("Type A"); | ||
ftp.NewFile("hello_world.txt"); | ||
ftp.Write("Hello World"); | ||
ftp.CloseFile(); | ||
|
||
ftp.CloseConnection(); | ||
} | ||
|
||
void loop() | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "esp32_ftpclient", | ||
"version": "0.0.1", | ||
"description": "A FTP-Client for the ESP32", | ||
"keywords": "sensors, low power, mobile, ftp, web, cloud, iot, esp32, espressif", | ||
"authors": | ||
{ | ||
"name": "Leonardo Bispo", | ||
"url": "https://github.com/ldab", | ||
"maintainer": true | ||
}, | ||
"repository": | ||
{ | ||
"type": "git", | ||
"url": "https://github.com/ldab/ESP32_FTPClient.git" | ||
}, | ||
"homepage": "https://github.com/ldab/ESP32_FTPClient", | ||
"export": { | ||
"exclude": [ | ||
"linux", | ||
"extras" | ||
] | ||
}, | ||
"frameworks": "arduino", | ||
"platforms": "espressif32", | ||
"examples": "examples/*/*.ino" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
; PlatformIO Project Configuration File | ||
; | ||
; Build options: build flags, source filter | ||
; Upload options: custom upload port, speed and extra flags | ||
; Library options: dependencies, extra library storages | ||
; Advanced options: extra scripting | ||
; | ||
; Please visit documentation for the other options and examples | ||
; https://docs.platformio.org/page/projectconf.html | ||
|
||
[platformio] | ||
env_default = esp32 | ||
src_dir = ./examples/upload_image | ||
lib_dir = ./ | ||
|
||
[env:esp32] | ||
platform = [email protected] | ||
board = esp32cam | ||
framework = arduino | ||
|
||
monitor_speed = 115200 | ||
|
||
board_build.f_cpu = 240000000L | ||
|
||
#board_build.partitions = partitions_custom.csv | ||
|
||
#upload_port = COM36 | ||
|
||
lib_deps = | ||
octocat |
Oops, something went wrong.