These are chat archives for SmingHub/Sming

31st
Oct 2015
David
@dmarkey
Oct 31 2015 00:12
@hreintke yes most likely, but most of it is closed source?
evanmj
@evanmj
Oct 31 2015 01:49
Hi folks. I'm finally having luck getting going on programming... My project is a web based motor controller essentially. I'm trying out Basic_PWM, and I have a blue LED hooked to GPIO12. After flashing, it runs the example program, but I get some erratic behavior from the LED. It generally seems to go from 100% to about 50% and back up, but it flickers to 100% as well. Any idea what is going on? I'm not current limiting the LED, maybe I'm sourcing too much from the pin?
evanmj
@evanmj
Oct 31 2015 01:57
I am setting it to 50% duty once on boot, and it still has a flicker
Is that normal?
evanmj
@evanmj
Oct 31 2015 02:36
found the issue already reported, my bad: SmingHub/Sming#70
hreintke
@hreintke
Oct 31 2015 08:26
@evanmj :
There is also effort to get this solved by using hardware timer pwm see PR #375
alon24
@alon24
Oct 31 2015 08:58
is there a guide or a link on how to add an eclipse make file param, like wifi_ssid, i tried adding in my make fild and in eclipse build->environment, same as i do for ssid and password, but it didi not dtick
can someone who did this help with a hint?
Richard Antony Burton
@raburton
Oct 31 2015 08:59
sorry, don't use eclipse, but i think a lot of the windows users do so im sure someone will be able to help you
hang on, what exactly is the issue? is it that your variable isn;t being passed through to the compiler?
alon24
@alon24
Oct 31 2015 09:00
yes
exaclty
Richard Antony Burton
@raburton
Oct 31 2015 09:00
they won't be, they only get passed to the makefile
there is code inthe makefile to pass through wifi_ssid to the compiler
that won't be there for new variables you add
alon24
@alon24
Oct 31 2015 09:02
so maybe this then:
# we will use global WiFi settings from Eclipse Environment Variables, if possible
WIFI_SSID ?= ""
WIFI_PWD ?= ""
ifneq ($(WIFI_SSID), "")
    CFLAGS += -DWIFI_SSID=\"$(WIFI_SSID)\"
endif
Richard Antony Burton
@raburton
Oct 31 2015 09:03
yes, that's the code, you'd need to something like that to pass it from the makefile to the compiler
but better than that is probably to just add it to cflags in eclipse, so you don't need to edit the makefile
i'll just check that's possible...
alon24
@alon24
Oct 31 2015 09:05
my thought here is actually for rboot ota, add an ota server address (and port)
so that I can add a task to deploy rom to that server.... (automatically download next version)
Richard Antony Burton
@raburton
Oct 31 2015 09:06
hmm, it's not, could easily add a new makefile variable called USER_CFLAGS that gets appended to the CFLAGS in which you could put any user defines
do you want me to do that?
alon24
@alon24
Oct 31 2015 09:08
sounds very good
yes I do,i think its a small thing that can help a lot, becuase it makes life easier :)
also could you throw in a var to make sure if TERMINAL should run
I hate the terminal, its no good (for me) on windows, and there I need to disable its running(I use esplorer, its much better)
Richard Antony Burton
@raburton
Oct 31 2015 09:11
don't know anything about that i'm afraid
ok, change is in develop
alon24
@alon24
Oct 31 2015 09:12
I will take develop, but the code I used did not work
Richard Antony Burton
@raburton
Oct 31 2015 09:12
if you update you can create a varibale called USER_CFLAGS which will get included in the CFLAGS passed to the compiler, put your defines in there
remember they need to be in compiler option format -DVARIABLE=VALUE
right, got to go...
alon24
@alon24
Oct 31 2015 09:14
thanks
@raburton did u check it in? which file?
alon24
@alon24
Oct 31 2015 09:20
ok found it
hreintke
@hreintke
Oct 31 2015 10:55
@alon24 :
I am on windows/eclipse and use the following for ESP/SMING_HOME, WIFI_SSID/PWD and COM_PORT
Go to Eclipse->Windows->Preferences->C++->Build->environment.
There you can define the variables which are then used in the makefiles.
Nice thing is that these are preference in the Eclipse Workspace so you can have multiple workspaces with different values.
For very useful for me because I have multiple SMING_HOME locations.
And of course you can add also the USER_CFLAGS in there
crosofg
@crosofg
Oct 31 2015 14:05
how do I pul l GPIO16 low through code? XPD_DCDC?
crosofg
@crosofg
Oct 31 2015 14:42
that was solved.
Guys, which all pins can be used by pwm api? I am using GPIO14 but its flickering. The pwm for GPIO 12, 13,5, 4 are not flickering.
zigarrre
@zigarrre
Oct 31 2015 15:11
hi
Whats the license of the examples? Can I reuse code (especially the html templates) from the HttpServer_ConfigNetwork in a MIT licensed project?
cameoDT
@cameoDT
Oct 31 2015 15:35
@hreintke @alon24 @raburton Hello. Can I use Sming Framework in my IOT product which I plan to sell? Please let me know if anything is required. I am planning to develop a sensor network and will use the modified examples from the Sming.
Richard Antony Burton
@raburton
Oct 31 2015 17:21
@cameoDT sming is LGPL, although it includes other components that may be licensed differently