In this section you will learn how to configure Smick and write your first sketch.
The Smick configuration (optional) is divided into 4 steps:
In step 5 you will write, execute and memorize your first sketch.
https://github.com/infosmick/Smick_Kit
C:\Smick\CH341SER\SETUP.EXE
C:\Smick\Smick.exe
Use it to program and configure Smick
] wifissid=mySSID
ok
] wifipass=myPass
ok
] save
ok
] mqttserver=myServerBroker
ok
] mqttport=myPort
ok
] mqttuser=myUserBroker
ok
] mqttpass=myPassBroker
ok
] mqttin=myInFeed
ok
] mqttout=myOutFeed
ok
] save
ok
] wifi=1
WIFI WiFi connection to 'mySSID' enabled
ok
]
Wait a few seconds for it to connect to the Wi-Fi router and the MQTT broker (see how the LED behaves in the various phases)
WIFI connected with IP: 192.168.1.142
NTP connecting to 0.it.pool.ntp.org
NTP date and time updated 07-09-2017 00:22:46
OTA Check firmware update
OTA no updates
MQTT connecting to m20.cloudmqtt.com:14596
MQTT user: smick, client-ID: Smick-217650678
MQTT uses user-defined feeds
MQTT subscribe to: I35232
MQTT publish on: O35232
< Conn
]
Now Smick is connected and ready: start creating your first sketch.
Define the start command
] start=[led=!led #1]
ok
and run it
] start
ok
]
The status LED starts to flash every second
You have created your first sketch!
If you wish to memorize it enter the command
] save
ok
If you now turn off Smick (extract the USB cable from the PC) and turn it on again (insert the USB cable into the PC) your sketck will be executed automatically.
To understand the command created, stop it with
] stop
ok
and try the following commands:
] led=1
ok
the LED lights up
] led=0
ok
the LED goes out
] led=!led
ok
the LED lights up because:
] led=!led #1
ok
The operator #1 repeats to infinity the command that precedes it once a second.