W dniu 04.06.2013 o 14:32 foster <[email protected]> pisze:
> Yes, the worst way looks only one viable.
> Looking every second to new ibutton can kill raspberry, or did you test
> it?
> Another solution is to use cron, but I don't know if some script can be
> run
> in less than minute.
> My friend told me about another solution - system events, but it's
> strange
> for me.
Events won't help beacuse you owserver has to "search" the 1-wire network
every second to determine if there is anything new. The beast solution
would be to build an own 1-wire master(with some microcontroller like
Atmega8)
that constantly pools the wires and when there is something attached it
initiates
hardware interrupt on Raspberry. However it's probably to complicated.
The solution with cron is way worse than infinite while loop because
the overhead of starting a program just to check if there is an iButton
connected is to high.
You could just add some sleep in the while loop
while(true)
{
check_1_wire
sleep(800); //miliseconds
}
and you will get reasonable performance.
--
p4trykx
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers