DS18B20 with eLua + Mizar32

已查看 31 次
跳至第一个未读帖子

Gabriel Duarte

未读,
2013年5月21日 13:52:102013/5/21
收件人 eLua Users and Development List (www.eluaproject.net)、miz...@googlegroups.com
Hello,

I recently bought a DS18B20 temperature sensor, but I got no idea how to connect it to Mizar32 and grab data from eLua. This is the datasheet:

http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf

Which interface I have to use, UART, some PWM pin??

Any help is appreciated ;)

Cheers

--
Gabriel Duarte
Linux User #471185
Rio de Janeiro / RJ
http://genericdev.wordpress.com/

Bogdan Marinescu

未读,
2013年5月21日 13:58:002013/5/21
收件人 miz...@googlegroups.com、eLua Users and Development List (www.eluaproject.net)
Hi,


On Tue, May 21, 2013 at 8:52 PM, Gabriel Duarte <confu...@gmail.com> wrote:
Hello,

I recently bought a DS18B20 temperature sensor, but I got no idea how to connect it to Mizar32 and grab data from eLua. This is the datasheet:

http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf

Which interface I have to use, UART, some PWM pin??

Any help is appreciated ;)

Neither, you'd have to use 1-Wire (https://en.wikipedia.org/wiki/1-Wire). We don't have support in eLua  for that yet, although it should be relatively easy to implement.

Best,
Bogdan


Cheers

--
Gabriel Duarte
Linux User #471185
Rio de Janeiro / RJ
http://genericdev.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Mizar32" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mizar32+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Gabriel Duarte

未读,
2013年5月21日 14:05:582013/5/21
收件人 miz...@googlegroups.com、eLua Users and Development List (www.eluaproject.net)
Hi!

The question is just how to send and get data, , what interface I have to use to send and receive data from the sensor. The rest, like decoding data, CRC, I'll implement myself.

Cheers


2013/5/21 Bogdan Marinescu <bogdan.m...@gmail.com>

Bogdan Marinescu

未读,
2013年5月21日 14:09:302013/5/21
收件人 miz...@googlegroups.com、eLua Users and Development List (www.eluaproject.net)
Hi,


On Tue, May 21, 2013 at 9:05 PM, Gabriel Duarte <confu...@gmail.com> wrote:
Hi!

The question is just how to send and get data, , what interface I have to use to send and receive data from the sensor. The rest, like decoding data, CRC, I'll implement myself.

And that is exactly what I was telling you. The interface is called 1-Wire, check the wikipedia link from my previous e-mail. Some MCUs have 1-Wire implemented in hardware, but only very few of them, so your best shot is to emulate it with a GPIO pin. I did this once and from what I remember it was quite an easy job.

Best,
Bogdan
 

Gabriel Duarte

未读,
2013年5月21日 14:18:132013/5/21
收件人 miz...@googlegroups.com、eLua Users and Development List (www.eluaproject.net)
Ok!

I thought that 1-Wire were only the protocol. Should I use UART from GPIO in Miza32 to emulate? I have seen some Arduino examples and they use PWM ports to read data, do not know if it's the same in eLua.
回复全部
回复作者
转发
0 个新帖子