These are chat archives for SmingHub/Sming

13th
Jan 2016
robotiko
@robotiko
Jan 13 2016 00:02
@/all anyone has lastest develop code with sdk 1.5.0 and HW_PWM working?
laurentppol
@laurentppol
Jan 13 2016 00:18
@robotiko I downloaded code for HW_TIMER,but didn't use yet (don't want to broke my app, if something goes wrong)
Richard Antony Burton
@raburton
Jan 13 2016 08:00
@hreintke i'm up, but about to head off to work
robotiko
@robotiko
Jan 13 2016 08:42
@alon24 are you using HW_PWM in your smart car with the latest sming
?
alon24
@alon24
Jan 13 2016 08:43
nope, no HW_PWM, no PWM at all (am thinking of regular software pwm, need to implement, no time :( )
This message was deleted
robotiko
@robotiko
Jan 13 2016 08:44
ok thanks
hreintke
@hreintke
Jan 13 2016 13:40
@raburton : update to the makefile to solve issue on flashlocation spiffs works OK.
crosofg
@crosofg
Jan 13 2016 15:44
if the path variable name for both sming rtos and smin nonos is SMING_HOME. what is to set in the env variable
hreintke
@hreintke
Jan 13 2016 15:48
@crosofg : that depends on the Sming version you want to use.
Indeed I did use the same env variable.
I did not notice/had problems with that as I set my env variables in eclipse and then they can be different for each workspace
Richard Antony Burton
@raburton
Jan 13 2016 17:02
@hreintke i'll put the spiffs calculation fix in then, thanks for testing
Richard Antony Burton
@raburton
Jan 13 2016 17:08
once you've merged, as you've modified the same makefile
hreintke
@hreintke
Jan 13 2016 17:15
@raburton : just replied in the repo issue. I am not sure how to proceed.
Do I need to make another branch for squashing ?
Richard Antony Burton
@raburton
Jan 13 2016 17:19
@hreintke i've done it, but if you prefer you can do it on your own branch
i just wanted to test it wasn't too tricky before suggesting it
sometimes these things can get a bit messy, but this worked fine
hreintke
@hreintke
Jan 13 2016 17:31
Just merged my fist branch ever on github. Hope I didn't break anything

BTW : The make test on windows gives

make[1]: Entering directory `/c/userdata/rtos_project/samples/Basic_Neopixel'
/c/userdata/rtos_project/sming/Makefile-project.mk:76: //c/userdata/rtos_project/sming/Makefile-windows.mk: No such host or network path

I will see whether I can find the issue

Richard Antony Burton
@raburton
Jan 13 2016 17:35
just on that one sample?
hreintke
@hreintke
Jan 13 2016 17:36
after this message it stops
I tried some updates to makefiles to get it solved but came into a situation that no sample was compiling at all
After that I left it and finished my restructuring
Richard Antony Burton
@raburton
Jan 13 2016 17:38
i can't do much to help on windows i'm afraid
hreintke
@hreintke
Jan 13 2016 17:39
I know, just let you know that is, for when you get questions on it
laurentppol
@laurentppol
Jan 13 2016 21:40
@all, where is code for HX711? I got one, so I can do some experiments
no NOS
laurentppol
@laurentppol
Jan 13 2016 21:47
thats it, thx :)
short look into... waiting in a "short loop" is not wanted on ESP. As according to HX711 "settling time" may be as long as 400ms...
robotiko
@robotiko
Jan 13 2016 21:54
add a timer for that if its the only issue
laurentppol
@laurentppol
Jan 13 2016 23:04
@robotiko something like this.
especially if it is "to be a library"
robotiko
@robotiko
Jan 13 2016 23:05
@laurentppol what do you mean with > something like this.
laurentppol
@laurentppol
Jan 13 2016 23:06
as if "we" don't count on it, there will be, in some moment "cumulation of side effects" and programs will suddently fail w/o apparent reason
robotiko
@robotiko
Jan 13 2016 23:06
yes a delay in the code should not be part of a lib
yes
laurentppol
@laurentppol
Jan 13 2016 23:06
what is the number of soft timers? infinite?
robotiko
@robotiko
Jan 13 2016 23:07
yes
ned any help with that ?
laurentppol
@laurentppol
Jan 13 2016 23:07
so we could try to use timer to some "non blocking" IO with HX
robotiko
@robotiko
Jan 13 2016 23:07
is quite simple
there are many examples with that
laurentppol
@laurentppol
Jan 13 2016 23:07
I already use timers
robotiko
@robotiko
Jan 13 2016 23:08
yes
that is the idea
laurentppol
@laurentppol
Jan 13 2016 23:08
not HW_TIMER, yet
robotiko
@robotiko
Jan 13 2016 23:08
never block cpu with delays
that will have side effects
laurentppol
@laurentppol
Jan 13 2016 23:08
main diff between ESP and AVR :)
robotiko
@robotiko
Jan 13 2016 23:08
yes
avr timers are real timers
most microcontrollers have several HW
laurentppol
@laurentppol
Jan 13 2016 23:09
and on ESP, how many are HW timers? 1 or 2?
robotiko
@robotiko
Jan 13 2016 23:09
1
laurentppol
@laurentppol
Jan 13 2016 23:09
upss
robotiko
@robotiko
Jan 13 2016 23:09
however I'm not sre if there are in fact 2
laurentppol
@laurentppol
Jan 13 2016 23:09
chineses gone too far in optimizing
robotiko
@robotiko
Jan 13 2016 23:10
the esp arduino has a servo lib and uses 2
and sdk refers to two different methods of callign the timer
so maybe there are two
anyway
dont get too crazy with HW timer
just needed in very critical timing stuff
for simple flwo control sw timers are great
laurentppol
@laurentppol
Jan 13 2016 23:12
I need it only if I use "phase control" to 230V
robotiko
@robotiko
Jan 13 2016 23:12
yes
laurentppol
@laurentppol
Jan 13 2016 23:13
this needs to be accurate & repeatable
robotiko
@robotiko
Jan 13 2016 23:13
for zero crossing detection you need hw timer for sure
for slow sensor bitbanging.. not really
laurentppol
@laurentppol
Jan 13 2016 23:14
but if no way on ESP, it may be implemented on side-by-side AVR
0xPIT
@0xPIT
Jan 13 2016 23:14
it could be possible to just count ticks since the zero-crossing, or set the timer overflow at the zero-crossing. one timer should be sufficient.
robotiko
@robotiko
Jan 13 2016 23:15
@0xPIT yes .. but hw one
in that control a minor delay from time to time is critical
for triac control and stuff like that
laurentppol
@laurentppol
Jan 13 2016 23:16
triac control
robotiko
@robotiko
Jan 13 2016 23:16
dimmer circuit?
laurentppol
@laurentppol
Jan 13 2016 23:17
on AVR I use Timer1 with 2500 as 10ms
0xPIT
@0xPIT
Jan 13 2016 23:17
one is sufficient. used only one in my avr reflow oven controller. I do phase control AND wave packet control simultaneously.
see 0xPIT/reflowOvenController
laurentppol
@laurentppol
Jan 13 2016 23:17
and ICR1A
@0xPIT do You have really stable grid voltage? in PL this is problem (long wires from 11kV/230V transformer)
0xPIT
@0xPIT
Jan 13 2016 23:19
nopw.
i do not use fixed timings.
i just count ticks from the zero-crossings.
a timer separately ticks with 100µS and acts on the collrected values and tick cound.
this method works quite nice.
laurentppol
@laurentppol
Jan 13 2016 23:26
ups, how it works? 100ms/sine? not 10ms per half wave?
0xPIT
@0xPIT
Jan 13 2016 23:27
100µS is the resolution.
I count the 100µS ticks from the last zero crossing and on/off the port pins accordingly.
get it?
laurentppol
@laurentppol
Jan 13 2016 23:35
@0xPIT if You want, I may send You "output power stabilizer" package (schematic + SW)
I think I got 1% power within 10% Uinput