These are chat archives for SmingHub/Sming

6th
Jan 2016
Andri
Jan 06 2016 01:49
Hi guys, as my issue here: SmingHub/Sming#536
is it possible to do good performance buffering on file system?
zhivko
@zhivko
Jan 06 2016 10:43
Hi guys - I just received HX711, and want to interact with it through Sming
there is arduino library there: https://github.com/bogde/HX711/blob/master/HX711.cpp
they use SCK and DATA pin, is there already made sming library to use this as two wire communication?
zhivko
@zhivko
Jan 06 2016 12:43
Ouch! - just connected 5V data line from HX711 to nodemcu on pin5, an guess what nodemcu still works... data is strange though! :)
ystrem
@ystrem
Jan 06 2016 12:47
@zhivko very nice ADC :) 24bit
:+1:
crosofg
@crosofg
Jan 06 2016 15:25
@hreintke noproblem as such
make all
LD out/build/app_0.out
c:/Espressif/ESP8266_SDK/lib\libssl.a(ssl_crypto_misc.o): In function base64_decode':
(.irom0.text+0x120): multiple definition of base64_decode'
c:/tools/sming/Sming/compiler/lib/\libsming.a(base64.o):C:\tools\Sming\Sming/Services/WebHelpers/base64.cpp:55: first defined here
collect2.exe: error: ld returned 1 exit status
make: *** [out/build/app_0.out] Error 1
in the nonos sming while trying to use espconn_secure_xxxxx
crosofg
@crosofg
Jan 06 2016 15:35
it was running fine untill I cloned the latest sming
crosofg
@crosofg
Jan 06 2016 15:51
I have to comment out 
 base64_decode
function from base64.cpp in webhelpers
to make it run
riban-bw
@riban-bw
Jan 06 2016 16:15
I've updated the api doc PoC at http://riban-bw.github.io/Sming/api to improve the modules section. Class methods are now shown. defines, enums, typedefs are now in own modules. I've added some more modules. Full class documentation is still available in classes section. I think the modules section looks better - more consistent across global functions and classes. I'm tempted to put some classes in the same module, e.g. clock, system clock, rtc. I haven't done this yet because I am concerned whether the functions might get interleaved, making it less clear what belongs to what. I will have a play.
crosofg
@crosofg
Jan 06 2016 16:20
people how to solve this
CC /C/tools/sming/Sming/rboot/appcode/rboot-api.c
CC /C/tools/sming/Sming/rboot/appcode/rboot-bigflash.c
AR out/build/app_app.a
LD out/build/app_0.out
c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.1.0/../../../../xtensa-lx106-elf/bin/ld.exe: out/build/app_0.out section .irom0.text' will not fit in region irom0_0_seg'
c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.1.0/../../../../xtensa-lx106-elf/bin/ld.exe: region irom0_0_seg' overflowed by 66 bytes
collect2.exe: error: ld returned 1 exit status
make: *** [out/build/app_0.out] Error 1
I have changed the irom_seg section to 0xC0000
  irom0_0_seg :                         org = 0x40240000, len = 0xC0000
in eagel.aap.v6.ld
total size of rom.bin is arund 296 kb
I have 4MB flash
Richard Antony Burton
@raburton
Jan 06 2016 16:23
@crosofg if you are using rBoot the linker script is called romX.ld in the apps main directory, so that's where you need to change the section length, not eagle.app.v6.ld
where X=0/1/etc.
@riban-bw this is already looking very good, sorry not had time to properly look at the rBoot stuff yet, but i will
hope i'll get a bit of time at the weekend!
crosofg
@crosofg
Jan 06 2016 16:25
@raburton changin to 0xC000 in rom0.ld worked. thanks
riban-bw
@riban-bw
Jan 06 2016 17:33
@raburton no worries. I have tweaked the source a bit to reduce the doc effort using the doxygen grouping method instead of using "@ingroup" for each function. I am doing some more documenting (just finishing filesystem) but should probably do a PR to get the docs in to source code repository soon.
Also looking at automating this with travis-ci which is described here: http://blog.gockelhut.com/2014/09/automatic-documentation-publishing-with.html
I will test the automation process soon.
Richard Antony Burton
@raburton
Jan 06 2016 17:35
nice!
Dmitry Kireev
@kireevco
Jan 06 2016 18:13
anyone played around MSP430?
riban-bw
@riban-bw
Jan 06 2016 18:21
Sorry if this is off topic but I am struggling with some of the most basic github processes. How does one update their fork so that it is up to date with the original, i.e. I have a fork of Sming that is 11 commits behind SmingHub:develop. How do I rectify that?
Richard Antony Burton
@raburton
Jan 06 2016 18:30
@riban-bw ensure you are on the right branch (e.g. develop) with git checkout develop
riban-bw
@riban-bw
Jan 06 2016 18:31
@raburton I am
Richard Antony Burton
@raburton
Jan 06 2016 18:31
then update (without creating local merge commits) with git pull --rebase upstream develop
riban-bw
@riban-bw
Jan 06 2016 18:31
okay - done that
Richard Antony Burton
@raburton
Jan 06 2016 18:32
that will unapply any local commits, update the repo and then reapply the commits on top
if there are conflicts you will have the opportunity then to make any required changes and these will then be integrated into your local version
if you want to push these back to your copy of the fork on github (you'll need to do this to create PRs) push it back up with git push origin develop
riban-bw
@riban-bw
Jan 06 2016 18:33
Cheers! I don't find git as intuitive as subversion!#
Richard Antony Burton
@raburton
Jan 06 2016 18:33
it's not
it took me a while to get used to it, and i still regularly have to google commands to remind myself how to do things
riban-bw
@riban-bw
Jan 06 2016 18:44
Cheers! I'm going to branch for this doxygen work - but dinner first!
laurentppol
@laurentppol
Jan 06 2016 20:43
I am going to use (modified a bit) HttpServer_NetworkConfig example,
I want ESP to start as WiFi client, then, if no connection to AP for let's say 30s start softAP and then HttpServer.
My question is how to detect AP is "online" for HttpServer to bind to AP IP on startup?
zhivko
@zhivko
Jan 06 2016 20:51
@alonewolfx2 are you here maybe?
alonewolfx2
@alonewolfx2
Jan 06 2016 20:53
Yep
zhivko
@zhivko
Jan 06 2016 20:53
@anybody: I try to use hx711, and arduino library to:
HOwever I read non logical values - maybe if somebody could check what I am doing wrong...

I just use:

hx711 = HX711(4, 5);
hx711.set_gain(64);

and then on hwtimer repeatedly read values like:

void IRAM_ATTR AnalogReadTimerInt() {
hardwareTimer.startOnce();
floatAnalog = result / 1.f;
}
ANd the aforementioned hx711 library
alonewolfx2
@alonewolfx2
Jan 06 2016 20:56
And what is serial log
zhivko
@zhivko
Jan 06 2016 20:56
serial log show OK... nothing special...
not resets or anything weird - I am streaming analog value to web page...
But as I change voltage on A+ line from 0 to 20mV - hx711 readings do not change...
alonewolfx2
@alonewolfx2
Jan 06 2016 21:01
i think firstly you need to test module on arduino 3.3v with that modification for make sure its working ok on 3.3v
zhivko
@zhivko
Jan 06 2016 21:01
I see 3.3V SCK and DATA lines on osciloscope - this should be OK
I made modification to the board as he suggested - and see 3.3V data and sck levels
I can make you an camera shot from osciloscope :)
alonewolfx2
@alonewolfx2
Jan 06 2016 21:02
haha :D still i think you need to try on arduino 3.3v for make sure :D
i had similiar issue with hc-sr04
zhivko
@zhivko
Jan 06 2016 21:03
I dont like arduino - I like SMING :)
it is so much easier to ota program :)
alonewolfx2
@alonewolfx2
Jan 06 2016 21:03
arduino mean - atmega328 or atmel familly :)

I am currently not using:

HX711::is_ready()

maybe I need to - before I make reading

alonewolfx2
@alonewolfx2
Jan 06 2016 21:06
ofcourse
and you must to set tare i think
zhivko
@zhivko
Jan 06 2016 21:07

but this:

    while(!hx711.is_ready())
{
delay(10);
}

is probably not ok for wdt ?

alonewolfx2
@alonewolfx2
Jan 06 2016 21:08
i think wdt cant reset with that code
zhivko
@zhivko
Jan 06 2016 21:08
OK I will try this without tare...
alonewolfx2
@alonewolfx2
Jan 06 2016 21:09
wdt doesnt lile more than 6 second but its ok with contunious 10ms
ok i am waiting
zhivko
@zhivko
Jan 06 2016 21:09
I have sharp distance sensor - it outputs max 3V
But I use voltage divider to drop it to 20mV....
I see a lot of noise on this 0-20mV line that is connected to hx711 A+ line with osciloscope.
But this can be due to my scope probes cable.. catching surrounding noise
distance sensor like:
https://www.pololu.com/product/136
zhivko
@zhivko
Jan 06 2016 21:14

I will use code like:

void IRAM_ATTR AnalogReadTimerInt() {
int maxTimeout = 100;
int sleeping = 0;
while (!hx711.is_ready() && sleeping < 100) {
delayMicroseconds(5);
sleeping = sleeping + 5;
}
hardwareTimer.startOnce();
floatAnalog = result / 1.f;
} else {
floatAnalog = -1.0;
}
}

it prevents indefinetly long loops...

same thing... I will try use tare...
zhivko
@zhivko
Jan 06 2016 21:28
@alonewolfx2: Maybe the problem is usb power supply ;)
sharp sensor + adc hx711 + nodemcu ?
probably is...
so 250mA from usb is not enough?
alonewolfx2
@alonewolfx2
Jan 06 2016 21:30
my usb ports is 500ma
if your 250ma propably power not enough
nodemcu can consume peak 250ma
zhivko
@zhivko
Jan 06 2016 21:32
Now everything is on external 5V power supply - it shows everything together consumes 122mA max...
so it's not power supply...
alonewolfx2
@alonewolfx2
Jan 06 2016 21:32
soo same result on external power?
zhivko
@zhivko
Jan 06 2016 21:33
yes same
its strange since I used tare function - it doesn't effect the result...
alonewolfx2
@alonewolfx2
Jan 06 2016 21:34
i think your module not working correctly
on 3.3v
zhivko
@zhivko
Jan 06 2016 21:35
hmmm... but wave forms on osciloscope... it shows data ...
alonewolfx2
@alonewolfx2
Jan 06 2016 21:35
have you i2c level conterter?
zhivko
@zhivko
Jan 06 2016 21:36
no - why it's 3.3v level I see on scope...
maybe I damaged nodemcu with 5V at first time...
When I haven't this change (with 12k resistor) in place...
but maybe not since on communication it is low current no?
alonewolfx2
@alonewolfx2
Jan 06 2016 21:43
i used esp-12 on 5v for a while(almost 3 mount) and still its working correctly(i dont recommend on 5v but still working :) )
zhivko
@zhivko
Jan 06 2016 21:48
hmm... on scope I see botom of data signal from hx711 on 500mV, but sck is perfect 0V.
that is not OK I think...
alonewolfx2
@alonewolfx2
Jan 06 2016 21:49
i think too
zhivko
@zhivko
Jan 06 2016 21:51
you think this could be due the modification of hx711 (swaping 20k with 12k resistor) ?
you think esp treats 500mV as logical 0 ?
or not?
alonewolfx2
@alonewolfx2
Jan 06 2016 21:53
laurentppol
@laurentppol
Jan 06 2016 21:53
@alonewolfx2 but isn't the ESP driving clock?
zhivko
@zhivko
Jan 06 2016 21:54
yes it is
laurentppol
@laurentppol
Jan 06 2016 21:55
@zhivko just disconnect it from HX, and look at it with the scope?
zhivko
@zhivko
Jan 06 2016 21:55
but SCK is OK.
Problem is DT
laurentppol
@laurentppol
Jan 06 2016 21:55
if there is (still) no clock, change ESP pin?
zhivko
@zhivko
Jan 06 2016 21:56
dt is floating above 0V on 500mV instead on 0V.
I think DT is written only by hx711
I disconnected DT from esp - and it is same.
laurentppol
@laurentppol
Jan 06 2016 21:59
all voltages on HX within datasheet?
zhivko
@zhivko
Jan 06 2016 22:00
If I disconect SCK from hx711 minimal voltage on dt on scope is 600mV - that's weird...
MAybe I damaged nodemcu... Will try with another one...
@laurentppol yes - I supply it from 3.3V now from nodemcu and it is 3.3V
laurentppol
@laurentppol
Jan 06 2016 22:01
input? bgref?
zhivko
@zhivko
Jan 06 2016 22:02
input you mean on A+ line ?
shit which is bgref ?
laurentppol
@laurentppol
Jan 06 2016 22:03
no, DIFF between A+ and A-, and is some clock on XO pin?
bandgap reference :)
VBG
zhivko
@zhivko
Jan 06 2016 22:04
A- is connected to GND - on A+ I have 20mV max
laurentppol
@laurentppol
Jan 06 2016 22:04
pin 6 on chip
zhivko
@zhivko
Jan 06 2016 22:07
i just measured 2V on it
is this good or bad ... havent check datasheet - yet :)
laurentppol
@laurentppol
Jan 06 2016 22:07
with the scope?
this is really a data-shit.. 9 pages :|
zhivko
@zhivko
Jan 06 2016 22:08
yes with scope...
they say it should be 1.25V typically ?
laurentppol
@laurentppol
Jan 06 2016 22:09
last check, XI is 0V?
or internal clock waveform
zhivko
@zhivko
Jan 06 2016 22:11
it is 0V
@laurentppol you think 600mV botom signal line from DT is not acceptable to esp ?
laurentppol
@laurentppol
Jan 06 2016 22:14
should be less than 0.2V
but look at ESP datasheet
zhivko
@zhivko
Jan 06 2016 22:14
than this is for sure problem...
I see DT line is also writen from esp on that library...
When you define gain
so it could be that esp is forcing this
laurentppol
@laurentppol
Jan 06 2016 22:24
but in HX DS it is, that You define gain/channel using clock pulses after getting data
and Chineses are crazy: in "ESP hardware user guide" there is NO mention of acceptable IO voltage levels...
zhivko
@zhivko
Jan 06 2016 22:26
hehe - welcome to cheap esp :)
laurentppol
@laurentppol
Jan 06 2016 22:29
BTW ESP DS says there IS WEP support, so why not in Sming?
I know, WEP is weak...
zhivko
@zhivko
Jan 06 2016 22:31
@laurentppol sorry have urgent thing too do
will be back with new nodemcu testing...
laurentppol
@laurentppol
Jan 06 2016 22:32
@zhivko have You tried to use "bare chip" (not lib), according to datasheet?
on monday I expect to have HX711 board :)
zhivko
@zhivko
Jan 06 2016 22:32
no
ah really! that is nice
What voltages you plan to measure ?
laurentppol
@laurentppol
Jan 06 2016 22:33
it is 6x cheaper than 1 channel LTC 24bit (bare chip)
Pt1000 sensing
in half bridge
I also have this LTC (got as sample :) ), so will compare then
m*
in my application I need resolution, low drift, absolute accuracy is no problem
Jim Sparkman
@jimsparkman
Jan 06 2016 22:48
who manages sming development?
alonewolfx2
@alonewolfx2
Jan 06 2016 23:41
sming is comunity :)