-
Hi,
Just moved from 1v41 to 1v52 and it seems that 1v52 consumes slighly more memory than 1v41
1v41>memory()
{"free":245,"usage":9,"total":254,"history":0,"stackEndAddress":536876380}
1v52>process.memory(){"free":242,"usage":12,"total":254,"history":0,"stackEndAddress":536875816,"fl}
I wonder if there are any plans to optimize memory usage.
We talked about it some time ago and as far as I remember it is possible to optimize internal data structure. Not sure if this optimization taken into account inn the future.Unfortunatelly I have a few VL boards and cannot make use of them (only simple project are possible due to memory constraints)
Thanks,
Bogdan -
1v52 may be affected by a save related bug. See similar issue here:
http://forum.espruino.com/conversations/671/#comment8824 -
@Gordon
Could you please comment on the save() behaviour reported in this thread?
Thanks, -
-
-
-
-
-
It seems that bluetooth can be used for accessing GSM modem:
http://bluehack.elhacker.net/downloads/spec/t68i_at_commands_dev_guidelines.pdfBogdan
-
T68i has the same DCU-11 interface as the T630 (uart interface with unfriendly connector, some people managed to solder 3 cables /rx, tx, gnd/ directly to the phone). I bought USB to DCU-11 cable and simply cut off the USB part and soldered serial cables to the plug).
The bad news is that you need to use PDU mode (7 bit encoding scheme also used by the Nokia FBUS):
http://twit88.com/home/utility/sms-pdu-encode-decode
Bogdan -
Some usefull AT commands:
Commands:
AT&F (Reset to factory settings)
AT+CMGF=1 (Turn off the PDU mode)
AT+CPMS="ME" (Save SMS messages to phone memory, not SIM)
AT+CNMI=,1 (When SMS message received - send notification to serial)
To send SMS: AT+CMGS="+33273022", then type your message. When done enter Ctrl-Z
To receive SMS: when phone recieves SMS, it sends: +CMGL: [no]. no is the SMS number, e.g. +CMGL: 1
To view SMS: AT+CMGR=[no]
To delete SMS: AT+CMGD=[no]Bogdan
-
Hi,
Some time ago (before espruino 1v30) I tried to port my Nokia based GSM temperature monitoring system to espruino. Just for fun because my linux based solution worked fine.
Unfortunately it was a failure because I was not able to implement the Nokia's FBUS protocol on 8KB STM32VLDiscovery board. I simply ran out of memory...
The other day I bought an old Sony Ericcsson T630 which has nice serial interface based on AT commands. Here you can find similar models (they may have slightly more difficult SMS encoding scheme so be warned!). These phones are really cheap - a couple of euros.
http://pinouts.ru/CellularPhones-P-W/erics_t28_pinout.shtml
Here you can see an example how easy you can send an SMS:var period=20 var ms="" var phone="+48999999999" function readTemp(){ return 20 //fake read just to show the idea } function sendSMS(msg){ setTimeout(function(){Serial2.println("AT+CMGS=\x22" + phone + "\x22")},500) setTimeout(function(){Serial2.println(msg)},1000) setTimeout(function(){Serial2.print("\x1a")},1500) } function hMon(type){ temp=readTemp() sendSMS(type+":"+temp+"C") } function handler(c){ ms=ms+c if (c=='\n'){ console.log(ms) ms="" } } Serial2.setup(9600) Serial2.onData(function (d) {handler(d.data)}) setTimeout(function(){Serial2.println('AT&F')},500) setTimeout(function(){Serial2.println('AT+CMGF=1')},1000) setInterval(function(){hMon("TEMPERATURE IS: ")},period*1000)
The code above is really rough (it's not an example of good javascript style, neither good programming). It's purpose is to show the idea of using cellphone with espruino.
Bogdan -
Li-Ion bateries (I mean for example those used in cellphones) are affected by self-discharging process (up to 2% per month). Of course it is much better than in older NiMH batteries but anyway we may get much more electricity than we expect after a few months.
Also battery age is important when we consider reusing of old phone batterry - the potential capacity might be also affected seriously.
Bogdan -
-
I tested simple de-bouncer. The setWatch is used once, then re-enabled after a period of 200ms just after the associated function is called:
function test(){ console.log("Hello!"); //the actual task done after pressing the BTN1 setTimeout(setupBTN1, 200); //every time test() is ran the BTN1 handler is enabled again after a period of 200ms } function setupBTN1(){ setWatch(test, BTN1, {repeat:false, edge:"rising"}); } setupBTN1(); //single BTN1-triggered test() function call is enabled
-
Yes, I understand.
I have forgotten that the VL and other Discovery boards are unsuported now.