Buffering?
Hi,
I have small code snippet to read content of a file, which should grow into simple tool to read temperature from sensor on Raspberry Pi:
module Main where
import System.Environment
main :: IO ()
main = do
[f] <- getArgs
s <- readFile f
putStr s
When this is called with the test file I have copied from the real location it works fine:
$ cat /sys/bus/w1/devices/28-000004e46240/w1_slave >test.txt
$ ./ds18b20 test.txt
53 01 4b 46 7f ff 0d 10 e9 : crc=e9 YES
53 01 4b 46 7f ff 0d 10 e9 t=21187
How ever when called with the real location nothing happens:
$ ./ds18b20 /sys/bus/w1/devices/28-000004e46240/w1_slave
Can someone help? I have thought that the file is not properly ended so I have tried to take just first line but that doest work either.
Thanks
Libor
_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners