sonoff touch settings for platformio?

476 views
Skip to first unread message

Ilkka Tengvall

unread,
Mar 29, 2017, 2:24:59 PM3/29/17
to SonoffUsers
Hi,

I'm about to reflash a new sonoff touch for the first time. This page says to set the board type to esp8285, which I can do. Question is how to set the memory size in Platformio?

Now the platformio looks like this:

$ grep -v "^;\|^$" platformio.ini 
[platformio]
src_dir = sonoff
[env:sonoff]
platform = espressif8266
framework = arduino
board = esp01_1m
board_flash_mode = qio
build_flags = -Wl,-Tesp8266.flash.1m64.ld -DMQTT_MAX_PACKET_SIZE=512
lib_deps = PubSubClient, NeoPixelBus, IRremoteESP8266, ArduinoJSON
[env:esp8285]
platform = espressif8266
board = esp8285
framework = arduino

If you have your settings for sonoff touch, please reply pasting them here. Or just guide me please :)

Ilkka Tengvall

unread,
Mar 29, 2017, 3:52:34 PM3/29/17
to SonoffUsers
Answering myself. I got it compiling and uploaded this way: Let's see if it will work

platformio]
src_dir = sonoff

[env:sonoff]
platform = espressif8266
framework = arduino
board = esp01_1m

; Select one of two board_flash_mode options below
; Sonoff Basic et al. (ESP8266 uses dio or qio)
board_flash_mode = qio
; Sonoff Touch and Sonoff 4CH (ESP8285 uses dout)
; board_flash_mode = dout

build_flags = -Wl,-Tesp8266.flash.1m64.ld -DMQTT_MAX_PACKET_SIZE=512
lib_deps = PubSubClient, NeoPixelBus, IRremoteESP8266, ArduinoJSON

[env:esp8285]
platform = espressif8266
board = esp8285
framework = arduino
board_flash_mode = dout

Randy Lust

unread,
Apr 6, 2017, 11:34:38 AM4/6/17
to SonoffUsers
What pins do you use for the touch?

Tobias

unread,
Apr 9, 2017, 3:57:49 AM4/9/17
to SonoffUsers
Hi Randy.

Please check the hardware preparation site, it is listed there :) 

Tobias

unread,
Apr 12, 2017, 2:32:56 PM4/12/17
to SonoffUsers
No problem uploading to the Sonoff Touch, but has anyone been able to run a debug yet?
Using platformio, but not able to debug the Touch (ESP8285) for some reason. 

jos...@elr.ae

unread,
Apr 16, 2017, 8:43:25 AM4/16/17
to SonoffUsers
I'm going to try this tonight, my loads on tho the Sonoff Touch but when i power them up nothing happens....

This is the changes I made on my platformio.ini please let me know if this is ok :
---------------------------------------

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter, extra scripting
;   Upload options: custom port, speed and extra flags
;   Library options: dependencies, extra library storages
;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/en/stable/projectconf.html


[platformio]
src_dir = sonoff

[env:sonoff]
platform = espressif8266
framework = arduino
board = ESP8285


; Select one of two board_flash_mode options below
; Sonoff Basic et al. (ESP8266 uses dio or qio)
board_flash_mode = dout

; Sonoff Touch and Sonoff 4CH (ESP8285 uses dout)
; board_flash_mode = dout

build_flags = -Wl,-Tesp8266.flash.1m64.ld -DMQTT_MAX_PACKET_SIZE=512
lib_deps = PubSubClient, NeoPixelBus, IRremoteESP8266, ArduinoJSON

----------------------------------

Tobias

unread,
Apr 17, 2017, 6:13:29 PM4/17/17
to SonoffUsers
Same, ended up writing everything I needed from scrach earlier today.

Slip7000

unread,
Apr 18, 2017, 12:05:29 AM4/18/17
to SonoffUsers


On Tuesday, April 18, 2017 at 2:13:29 AM UTC+4, Tobias wrote:
Same, ended up writing everything I needed from scrach earlier today.

Would you mind to share, and did it work? My code did not work last night .
Reply all
Reply to author
Forward
0 new messages