-
• #2
why I don't see the name of the device "david-Iphone", "My-computer" ? like I see when I scan using my phone?
"My-computer"/etc is probably using Bluetooth, not bluetooth LE
getTime() but he gave me 821.90802001953
Turn on
Set time on upload
in the IDE comminications settings and upload some code. The default is 'on' so I'm surprised it's not ok.(new Date()).toString()
should then give you a nice dateis there any way I can save the data as text\json ? and then upload it to my device ?
I just answered this in one of your other posts
after I save the wanted devcies after scan , is there any way to know how much free space I got left on the devcie?
process.memory()
-
• #3
Great
but after reboot the device , I'm getting 1970 .
I'm guessing it's because the device dons't have a RTC on it .
so my question is - can I connect RTC to it?
I have RTC module that I use to work with him on Arduino? can I connect it ?
and if yes - can you share a link "howto"?Thanks ,
-
• #4
The nRF52 has an RTC but it's only 24 bit which means it can't store the full date (since 1970). As long as you don't do a hard reboot or unplug power it'll be fine.
Yes you can add an RTC. If you just search the Espruino site for RTC you'll get http://www.espruino.com/DS3231
-
• #5
I probelly will reboot the unit and remove the battery every few days,
this is why I need the clock.
I looked at the page you link me and saw I need to use this pins:3V3 VCC
GND GND
B6 (SCL) DIO
B7 (SDA) AIOyou rcommand to use pullup resistors , will 10K is good for this job?
also I want to connect an external storage (that way I will be sure that it save me the data even if the power is down\unplug)
and this is the pinout you suggest:
SD Card Espruino
DI/CMD B5
DO/DAT0 B4
SCLK/CLK B3
CD/CS/DAT3 B6
VDD 3.3v
VSS/GND GNDagain will 10K resistors will be good here also? (when I search google ,many examples for pullup 3.3V where 10K ).
another question is can I use RTC and external storage at the same time on the same device?
because I can see that both of them are using B6
can I change one of them to use B8 (for example)?
maybe for the exteranl CS? and then just change it also at the code ?// Wire up up MOSI, MISO, SCK and CS pins (along with 3.3v and GND) SPI1.setup({mosi:B5, miso:B4, sck:B3}); E.connectSDCard(SPI1, B8 /*CS*/); // see what's on the device console.log(require("fs").readdirSync());
Thank you for the answers in all the posts :-) ,
by the way - maybe I'm working too hard and there is another solution for me ?
a bluetooth5 BLE with RTC and SD card device? -
• #6
Yes, 10k is fine - however if you use software I2C then there is no need for pullup resistors :) It's still an idea for SD cards though (at least on CS)
You don't actually need to use B3/4/5/etc - on the nRF52 chip you're using you can use any pins.
maybe I'm working too hard and there is another solution for me ?
In terms of RTC, I think you are. The RTC will need its own battery or it will lose time too, so why not just permanently connect a battery to the MDBT42? Even a supercap on the 3.3v line should provide enough power for the main battery to be unplugged for a minute or so.
The MDBT42Q draws so little power it seems there is no real reason to turn it off.
Also you have 40k of nonvolatile storage on the MDBT42Q - so if that's enough you could avoid the SD card. SD cards can draw a lot of power when on so you may have difficult running from a small battery
-
• #7
- what do you mean by "software I2C"?
isn't the code should be 'backup" by electronic?
and what do you mean by this ?
It's still an idea for SD cards though (at least on CS)
- I will check and run my test about the 40k ,
Thanks ,
- what do you mean by "software I2C"?
-
• #8
what do you mean by "software I2C"?
This should help: http://www.espruino.com/I2C
Software I2C (vs hardware) can apply internal pull-up resistors so doesn't need external ones
-
• #9
OK , I will try it
why it said that it's recommand to use physical pull up resistors?and about the SD card ,
- if I power it using the MDBT42Q (3.3V) meaning the the data ill also work on 3.3V (this is what I know - is this ture? am I correct?
- if the above is true . will you still recomand to use the pullups?
- I found in the SD datasheet , that the operation is 3.3V\10uA - do you know if this really the value of the Amper? can I use this to calculate the neeeded battery?
Thanks ,
- if I power it using the MDBT42Q (3.3V) meaning the the data ill also work on 3.3V (this is what I know - is this ture? am I correct?
-
• #10
if I power it using the MDBT42Q (3.3V) meaning the the data ill also work on 3.3V (this is what I know - is this ture? am I correct?
Yes.
if the above is true . will you still recomand to use the pullups?
Only on the CS pin - which stops the SD card getting potentially corrupted if there's electrical noise.
I found in the SD datasheet , that the operation is 3.3V\10uA - do you know if this really the value of the Amper?
I don't know. The best way is to measure it for sure when it is working. 10uA is pretty low though.
Hello,
I want to scan and save a list of my devices around me
this is what I get :
so I see that I have 3 devices around me
I have sevral queesion about it :
I have try to add time using
but he gave me
the MDBT42Q doesn't have an internal clock? , can I add to it RTC devcie to get the time?
or maybe there is another device that already have rtc inside of it?
4.is there any way I can save the data as text\json ? and then upload it to my device ?
Thanks ,