Fórum Ubuntu CZ/SK

Ostatní => Ubuntu Server => Téma založeno: 1x23 09 Září 2007, 14:09:43

Název: teploměr
Přispěvatel: 1x23 09 Září 2007, 14:09:43
ahoj vyrobil jsem si teploměr podle návodu http://sweb.cz/trifid2/teplomer/index.htm ale nevím jak to rozchodit pod Linuxem. Jestli někdo víte jak na to tak prosím poraďte. Díky

napište prosím přesný návod jak to rozchodit. díky
Název: teplomer
Přispěvatel: Martin-22 11 Září 2007, 18:42:06
No nevim, ale na te strance je presny navod jak to rozchodit, navic na odkazu na rootu to je taky ;)
Název: Re: teplomer
Přispěvatel: 1x23 24 Listopadu 2007, 22:06:21
jo to sice je ale nevím jak to udělat aby se to zobrazovalo na webu. čidlo vypíše hodnotu ale já nevím jak to zpracovat aby se to zobrazilo na webu.
Název: Re: teplomer
Přispěvatel: DarkenCZ 24 Listopadu 2007, 22:14:55
skript v bash/perl/python/php který načte vrácenou hodnotu a zapíše ji do souboru v docrootu apache?
Název: Re: teplomer
Přispěvatel: 1x23 25 Listopadu 2007, 09:40:20
no něco takového, ale s tím neumím tak se ptám jak na to ...
Název: Re: teplomer
Přispěvatel: DarkenCZ 25 Listopadu 2007, 10:07:25
nějak takhle:
Kód: [Vybrat]
sudo apt-get install php5

Kód: [Vybrat]
<?php
$cmd 
"teplomer --zmer"//potřeba upravit příkaz
$data shell_exec($cmd);
//možná nějak oříznout výstup...
$fp fopen ("/home/web/teplota.php""w+"); //potřeba upravit cestu
fwrite($fp$data);
$fclose($fp);
?>

uložit někam třeba do ulozTeplotu.php

Kód: [Vybrat]
chmod +x ulozTeplotu.php
php5 ulozTeplotu.php
Název: Re: teplomer
Přispěvatel: 1x23 25 Listopadu 2007, 10:51:14
ahoj teplotu zjišťuji takhle:

server:~/cidlo_2# ./digitemp_DS9097 -a -s /dev/ttyS1

ale nevím jak to tam dopsat zatím to nefunguje. dělám to asi špatně
Název: Re: teplomer
Přispěvatel: Pavelp 25 Listopadu 2007, 19:40:57
No a kde je ta teplota?
Název: Re: teplomer
Přispěvatel: 1x23 25 Listopadu 2007, 21:00:35
teplota je :)

server:~/cidlo_2# ./digitemp_DS9097 -a -s /dev/ttyS1
DigiTemp v3.3.2 Copyright 1996-2004 by Brian C. Lane
GNU Public License v2.0 - http://www.brianlane.com
Nov 25 21:07:41 Sensor 0 C: 3.88 F: 38.98
Název: Re: teplomer
Přispěvatel: 1x23 14 Prosince 2007, 14:54:39
nevíte někdo co s tím teploměrem, aby to vypisovalo grafy anebo aspoň hodnoty na web?
Název: Re: teplomer
Přispěvatel: Pavelp 28 Prosince 2007, 19:19:15
Ty odpovedi prezvykat nejakym skriptem, ktery z toho vyzobne cas a teplotu a zalozi do databaze. Atak dal.
Jestli to uz nekdo nenapsal, bude to dost prace.
Název: Re: teplomer
Přispěvatel: 1x23 31 Prosince 2007, 20:13:32
ahoj něco jsem našel http://www.linuxsoft.cz/article.php?id_article=1203

píšou tam že by to měl umět munin, ale nejsem schopný napsat script, čidlo je ttyS1. nevíte někdo co s tím?
Název: Re: teplomer
Přispěvatel: 1x23 31 Prosince 2007, 21:27:41
neví někdo jak to upravit aby to fakalo? je to script pro munin.

Kód: [Vybrat]
#!/bin/sh

if [ "$1" = "config" ]; then
echo 'graph_title Teplota'
echo 'graph_args --upper-limit 100 -l 0'
echo 'graph_vlabel Celsius'
echo 'graph_category Temperatures'
echo 'graph_info Teplota cidlo.'
echo 'sensor0.label Sensor 0'
echo 'sensor0.info Prvno Sensor.'
echo 'sensor0.draw LINE2'

exit 0
fi
echo sensor0.value `/root/digitemp-3.3.2/digitemp_DS9097 -i -s /dev/ttyS1`
Název: Re: teplomer
Přispěvatel: 1x23 01 Dubna 2008, 21:49:29
ahoj tak jsem zkoušel to co je nahoře ale nejde to a píše to tohle:

fatal error: Function name must be a string in /home/1x23/www/uloz_teplotu.php on line 6

mám soubor uloz_teplotu.php a v něm:
Kód: [Vybrat]
<?php
$cmd 
"/digitemp-3.3.2# ./digitemp_DS9097 -a -s /dev/ttyS1";
$data shell_exec($cmd);
$fp fopen ("/home/1x23/www/teplota.php""w+");
fwrite($fp$data);
$fclose($fp);
?>

další soubor teplota php.

u obou souborů mám nastaveno 777

neví někdo co s tím? jak tu teplotu teda odchytávat aby se mohlo zobrazovat na webu???

děkuji za jakékoliv rady
Název: Re: teploměr
Přispěvatel: Martin Kiklhorn 02 Dubna 2008, 05:45:10
vůbec se mi nezdá
Kód: [Vybrat]
/digitemp-3.3.2# v řádku 2 a také to že zbytek cesty je napsán relativně.
Pokud bys změnil řádek 2 na
Kód: [Vybrat]
$cmd = "pwd"; tak bys měl dostat cestu ke které je relativně umístěn ten soubor digitemp_DS9097
Pokud jej máš jinde tak to nemá co spustit.
Nebo to neřeš tímto způsobem (já jsem jen takový výzkumník a zajímá mne kde se co...) a zkus zadat cestu absolutně tedy řádek 2 třeba
Kód: [Vybrat]
$cmd = "/asi_home_ale_ne_tilda_protoze_nevim_pod_jakym_userem_je_ten_php_spusteny/muj_folder_s_teplomerem/digitemp_DS9097 -a -s /dev/ttyS1";
EDIT: a co ti vrátí v konzoli napsaný příkaz
Kód: [Vybrat]
echo sensor0.value `/root/digitemp-3.3.2/digitemp_DS9097 -i -s /dev/ttyS1`?
Název: Re: teploměr
Přispěvatel: 1x23 02 Dubna 2008, 16:22:33
Kód: [Vybrat]
echo sensor0.value `/root/digitemp-3.3.2/digitemp_DS9097 -i -s /dev/ttyS1`
Wrote .digitemprc
sensor0.value DigiTemp v3.3.2 Copyright 1996-2004 by Brian C. Lane GNU Public License v2.0 - http://www.brianlane.com Turning off all DS2409 Couplers . Searching the 1-Wire LAN 28AEC31A010000B5 : DS18B20 Temperature Sensor ROM #0 : 28AEC31A010000B5


Název: Re: teplomer
Přispěvatel: Martin Kiklhorn 04 Dubna 2008, 04:16:01
a co napíše tohle:
Kód: [Vybrat]
echo `/root/digitemp-3.3.2/digitemp_DS9097 -a -s /dev/ttyS1` | tail -n 1 -?

Pokud je to to co chcete dostat tak řádek 2 skriptu uloz_teplotu.php si změnte na
Kód: [Vybrat]
$cmd = "echo `/root/digitemp-3.3.2/digitemp_DS9097 -a -s /dev/ttyS1` | tail -n 1 -";
Pokud je to ne úplně to co chcete ale alespoň se to blíží tak sem pastněte výstup.
A případně také výstup následujícího:
Kód: [Vybrat]
/root/digitemp-3.3.2/digitemp_DS9097 --help

Název: Re: teploměr
Přispěvatel: 1x23 10 Května 2008, 15:44:33
Kód: [Vybrat]
echo `/root/digitemp-3.3.2/digitemp_DS9097 -a -s /dev/ttyS1` | tail -n 1 -
pisne:

Kód: [Vybrat]
echo `/root/digitemp-3.3.2/digitemp_DS9097 -a -s /dev/tty
DigiTemp v3.3.2 Copyright 1996-2004 by Brian C. Lane GNU Public License v2.0 - http://www.brianlane.com May 10 15:21:20 Sensor 0 C: 16.81 F: 62.26
[/color]


Kód: [Vybrat]
/root/digitemp-3.3.2/digitemp_DS9097 --help
pisne

Kód: [Vybrat]
/root/digitemp-3.3.2/digitemp_DS9097 --help
/root/digitemp-3.3.2/digitemp_DS9097: invalid option -- -
DigiTemp v3.3.2 Copyright 1996-2004 by Brian C. Lane
GNU Public License v2.0 - http://www.brianlane.com
Compiled for DS9097


Usage: digitemp [-s -i -U -l -r -v -t -a -d -n -o -c]
                -i                            Initalize .digitemprc file
                -w                            Walk the full device tree
                -s /dev/ttyS0                 Set serial port
                -l /var/log/temperature       Send output to logfile
                -c digitemp.conf              Configuration File
                -r 1000                       Read delay in mS
                -v                            Verbose output
                -t 0                          Read Sensor #
                -q                            No Copyright notice
                -a                            Read all Sensors
                -d 5                          Delay between samples (in sec.)
                -n 50                         Number of times to repeat
                                              0=loop forever
                -A                            Treat DS2438 as A/D converter
                -O"counter format string"      See description below
                -o 2                          Output format for logfile
                -o"output format string"      See description below
                -H"Humidity format string"    See description below

Logfile formats:  1 = One line per sensor, time, C, F (default)
                  2 = One line per sample, elapsed time, temperature in C
                  3 = Same as #2, except temperature is in F
        #2 and #3 have the data seperated by tabs, suitable for import
        into a spreadsheet or other graphing software.

        The format string uses strftime tokens plus 5 special ones for
        digitemp - %s for sensor #, %C for centigrade, %F for fahrenheit,
        %R to output the hex serial number, and %N for seconds since Epoch.
        The case of the token is important! The default format string is:
        "%b %d %H:%M:%S Sensor %s C: %.2C F: %.2F" which gives you an
        output of: May 24 21:25:43 Sensor 0 C: 23.66 F: 74.59

        The counter format string has 2 special specifiers:
        %n is the counter # and %C is the count in decimal.
        The humidity format uses %h for the humidity in percent
[/color]

Mam dva soubory teplota.txt a uloz_teplotu.php

teplota.txt mam na 777

uloz_teplotu.php

Kód: [Vybrat]
<?php
$cmd 
"echo `/root/digitemp-3.3.2/digitemp_DS9097 -a -s /dev/ttyS1` | tail -n 1 -";
$data shell_exec($cmd);
//možná nějak oříznout výstup...
$fp fopen ("/home/s/www/teplota.txt""w+"); //potřeba upravit cestu
fwrite($fp$data);
$fclose($fp);
?>
[/color]

Na strance se mi zobrazi:
teplota.txt

Kód: [Vybrat]
DigiTemp v3.3.2 Copyright 1996-2004 by Brian C. Lane GNU Public License v2.0 - http://www.brianlane.com
[/color]

uloz_teplotu.php

Kód: [Vybrat]
Fatal error: Function name must be a string in /home/s/www/uloz_teplotu.php on line 7
Ale co je divné že mi nechytá druhé čidlo, na druhý com port se nedostanu




Název: Re: teploměr
Přispěvatel: Martin Kiklhorn 11 Května 2008, 02:39:31

uloz_teplotu.php

radek 2 - spatne apostrofy, potlaceni copy hlasky dle vypisu helpu - pridan parametr -q
Kód: [Vybrat]
$cmd = "echo `/root/digitemp-3.3.2/digitemp_DS9097 -q -a -s /dev/ttyS1 | tail -n 1 -`";
posledni radek - udelat presne to co pise chybova hlaska - tedy umazat $ na zacatku
Kód: [Vybrat]
fclose($fp);

ted by uz v /home/s/www/teplota.txt mely pribyvat zaznamy s teplotou

- vypis na web stranku vsech - viz manual php - "include teplota.txt"
- vypis jen aktualni hodnoty - echo $data

----------------------------
Takhle se teplota zaloguje pri kazdem zobrazeni stranky.
Pro pravidelne logovani po minutce do souboru by
 mozna bylo lepsi spustit digitemp s parametry -d 60 -n 0 -l cestaklogu  a nejake formatovani vystupu -o
a do web stranky jen includovat ten log soubor
Název: Re: teploměr
Přispěvatel: 1x23 11 Května 2008, 12:07:20
ahoj, tak to ted zkoušim ale do teplota.txt se mi nic nezapisuje.

teplotu to vypisuje

Kód: [Vybrat]
thule:~/digitemp-3.3.2# digitemp_DS9097 -q -a -s /dev/ttyS1 | tail -n 1 -
May 11 12:10:12 Sensor 0 C: 18.25 F: 64.85

ale do teplota.txt se nic neuloži
Název: Re: teploměr
Přispěvatel: Martin Kiklhorn 11 Května 2008, 15:38:52
ale do teplota.txt se nic neuloži

Zapisovat by to měla ta php stránka uloz_teplotu.php při každém svém zobrazení.
Vypisuje alespoň nějakou chybu?
Název: Re: teploměr
Přispěvatel: 1x23 11 Května 2008, 16:49:08
ne žádnou chybu to nevypisuje
Název: Re: teploměr
Přispěvatel: Thomas123 15 Července 2008, 18:21:48
Čau, také mám tento teploměr. Dnes jsem ho připjil k serveru. Chtěl jsem nainstalovat Digitemp, to se mi podařilo až takovým krkolomným způsobem. (Kompilace nešla). Nainstaloval jsem to pomocí Synapticu a protože nevím, jak jsem to měl spustit, tak jsem si z deb balíčku vytáhl stejnou verzi, jen tu, která je potřeba k běhu. To jsem si nakopíroval do /root/my-digitemp/digitemp_DS9097. Kdyby mi někdo napsal, jak se dá spustit onen program (ten co jsem instaloval pomocí Synapticu) byl bych rád.

Na serveru jsem nechal vytvořit onen soubor (nějaký, ten co se vytváří při prvním připojení), teplotu jsem si úspěšně vyčetl a vyzkoušel logování do souboru pomocí tohoto příkazu:
Kód: [Vybrat]
/root/my-digitemp/digitemp_DS9097 -q -a -s /dev/ttyS0 -d 60 -n 0 -l /var/www/teplomer/cidlo-server.txtServer spravuji na dálku pomocí webminu, zde jsem do Systém/Cron plánovač úloh/Vytvořit novou plánovanou úlohu zapsal:
Spustit příkaz jako: Root
Aktivní: Ano
Příkaz: /root/my-digitemp/digitemp_DS9097 -q -a -s /dev/ttyS0 -d 60 -n 0 -l /var/www/teplomer/cidlo-server.txt
Vstup příkazu: Sem nevím, co napsat
Popis: Jsem nevyplnil

Čas spuštění/jednoduchý plánovač: Při bootování systému.

Může mi někdo vysvětlit proč mi při rebootu systému se proces objeví v Systém/Spuštěné procesy, ale onen soubor neexistuje ani se nezapisuje?
Název: Re: teploměr
Přispěvatel: Martin Kiklhorn 16 Července 2008, 01:07:43
ve výpisu procesů je napsáno pod kým je spuštěn. Má tento přístup pro zápis do uvedeného souboru?
Název: Re: teploměr
Přispěvatel: Thomas123 16 Července 2008, 09:34:34
ve výpisu procesů je napsáno pod kým je spuštěn. Má tento přístup pro zápis do uvedeného souboru?

No spouštím to pod rootem, takže by měl mít přístup všude, ne?
Název: Re: teploměr
Přispěvatel: Thomas123 16 Července 2008, 11:44:16
Tak se mi již povedlo to spuštění při bootu. Do příkazu jsem vložil:

Kód: [Vybrat]
cd /root/my-digitemp/ && digitemp_DS9097 -q -a -s /dev/ttyS0 -d 60 -n 0 -l /var/www/teplomer/cidlo-server.txt
a už mi loguje teploty. Teď jdu vyzkoušet vypsání na web a dám vědět, jak jsem dopadl nebo příjdu poprosit o radu. ;-)
Název: Re: teploměr
Přispěvatel: Thomas123 16 Července 2008, 15:17:00
Takže, nalezli jsme řešení.

Kdo chcete vypisovat teplotu na web i s archivací, tak:
1.) ./digitemp_DS9097 -q -a -s /dev/ttyS0 -d 60 -n 0 -l /var/www/teplomer/cidlo.txt by měl běžet stále
2.) Do index.php pak vepište:
Kód: [Vybrat]
<?php
$soubor 
fopen("cidlo-server.txt""r");
if(
$soubor) {
   while(!
feof($soubor)) {
      
$tmp fgets($soubor);
      if(!empty(
$tmp)) $radek $tmp;
   }
   
$teplota substr($radek285);
   echo 
$teplota;
   
fclose($soubor);
}
?>

A měla by se Vám již vypisovat teplota. Za velikou pomoc patří kernel_panic [passed]. Dostal jsem to s tím, že nejsou ošetřeny chyby, když budete vědět, co a jak, dejte vědět.
Název: Re: teploměr
Přispěvatel: 1x23 30 Října 2008, 19:15:47
ahoj dá se koupit nebo vyrobit usb teploměr funkční v linuxu??
Název: Re: teploměr
Přispěvatel: Martin Kiklhorn 01 Listopadu 2008, 17:46:29
ahoj dá se koupit nebo vyrobit usb teploměr funkční v linuxu??
1) použít nějaké stávající zapojení pro rs232 a přidat k němu nějaký šváb pro připojení k USB třeba od ftdichip (http://www.ftdichip.com/FTProducts.htm)
2) použít nějaký jednočip s USB sběrnicí a nějakým A/D převodníkem, připojit čidla pro teplotu, vlhkost a cokoliv dalšího, udělat si kalibrační body, vymyslet komunikační protokol, napsat si ovladač.
Název: Re: teploměr
Přispěvatel: osso 02 Listopadu 2008, 21:01:59
Jedno velmi elegantní řešení je - jmenuje se to OWFS. Rozchodil jsem to na ubuntu servru v pohodě, sice požívám jako vstup com port, ale maxim/ti posílá jako vzorky zdarma i převodník na USB v owfs podporovaný. OWFS funguje sqjele :-), a počet čidel je neomezený.
Název: Re: teploměr
Přispěvatel: 1x23 10 Ledna 2009, 16:56:08
Jedno velmi elegantní řešení je - jmenuje se to OWFS. Rozchodil jsem to na ubuntu servru v pohodě, sice požívám jako vstup com port, ale maxim/ti posílá jako vzorky zdarma i převodník na USB v owfs podporovaný. OWFS funguje sqjele :-), a počet čidel je neomezený.

ahoj, jak jsi to myslel stim převodníkem, kde se to da koupit?

http://marek.drapal.org/1-wire-a-linux nasel jsem tuhle stranku. ale nechapu jak je to stim prevodnikem, je to obyčejný  usb/com?

http://hw.cz/rozhrani/art1215-sbernice-1-wire.html

ale jak napojit usb konektro na 1-wire? tak už teda vim jak napojit čidlo.
existuje redukce

http://obchod.hw.cz/?cls=stoitem&stiid=39195

ale cena hodne vysoka

už jsem to možná nasel


http://www.abclinuxu.cz/blog/uf_ja_nechci_blog/2007/11/3/198847
Název: Re: teploměr
Přispěvatel: 1x23 22 Března 2010, 19:00:26
Ahoj, tak jsem po dlouhé době chtěl měřit teplotu, ale zkončil jsem hned při instalaci.

Kód: [Vybrat]
/digitemp-3.3.2# make ds9097
gcc -I./src -I./userial -O2  -DLINUX   -c -o src/digitemp.o src/digitemp.c
src/digitemp.c:362:19: error: stdio.h: No such file or directory
src/digitemp.c:363:20: error: stdlib.h: No such file or directory
src/digitemp.c:364:19: error: ctype.h: No such file or directory
src/digitemp.c:365:20: error: unistd.h: No such file or directory
src/digitemp.c:367:20: error: getopt.h: No such file or directory
src/digitemp.c:369:23: error: sys/types.h: No such file or directory
src/digitemp.c:370:22: error: sys/stat.h: No such file or directory
src/digitemp.c:371:22: error: sys/time.h: No such file or directory
src/digitemp.c:372:18: error: time.h: No such file or directory
src/digitemp.c:373:20: error: string.h: No such file or directory
src/digitemp.c:374:19: error: fcntl.h: No such file or directory
src/digitemp.c:375:21: error: strings.h: No such file or directory
In file included from src/digitemp.c:387:
./userial/ownet.h:213: error: expected ‘)’ before ‘*’ token
In file included from src/digitemp.c:388:
./userial/owproto.h:40: error: expected ‘)’ before ‘*’ token
./userial/owproto.h:50: error: expected declaration specifiers or ‘...’ before ‘ulong’
./userial/owproto.h:62: error: expected declaration specifiers or ‘...’ before ‘ushort’
./userial/owproto.h:63: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘docrc16’
./userial/owproto.h:76: error: expected declaration specifiers or ‘...’ before ‘ulong’
src/digitemp.c:465: error: ‘NULL’ undeclared here (not in a function)
src/digitemp.c: In function ‘usage’:
src/digitemp.c:478: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c: In function ‘build_tf’:
src/digitemp.c:624: warning: incompatible implicit declaration of built-in function ‘sprintf’
src/digitemp.c: In function ‘build_cf’:
src/digitemp.c:769: warning: incompatible implicit declaration of built-in function ‘sprintf’
src/digitemp.c: In function ‘log_string’:
src/digitemp.c:861: error: ‘O_CREAT’ undeclared (first use in this function)
src/digitemp.c:861: error: (Each undeclared identifier is reported only once
src/digitemp.c:861: error: for each function it appears in.)
src/digitemp.c:861: error: ‘O_WRONLY’ undeclared (first use in this function)
src/digitemp.c:861: error: ‘O_APPEND’ undeclared (first use in this function)
src/digitemp.c:862: error: ‘S_IRUSR’ undeclared (first use in this function)
src/digitemp.c:862: error: ‘S_IWUSR’ undeclared (first use in this function)
src/digitemp.c:862: error: ‘S_IRGRP’ undeclared (first use in this function)
src/digitemp.c:862: error: ‘S_IROTH’ undeclared (first use in this function)
src/digitemp.c:864: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:867: warning: incompatible implicit declaration of built-in function ‘strlen’
src/digitemp.c:871: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c: In function ‘log_temp’:
src/digitemp.c:886: error: ‘time_t’ undeclared (first use in this function)
src/digitemp.c:886: error: expected ‘;’ before ‘mytime’
src/digitemp.c:889: error: ‘mytime’ undeclared (first use in this function)
src/digitemp.c:896: warning: incompatible implicit declaration of built-in function ‘strftime’
src/digitemp.c:896: warning: passing argument 4 of ‘strftime’ makes pointer from integer without a cast
src/digitemp.c:898: warning: incompatible implicit declaration of built-in function ‘strcat’
src/digitemp.c:900: warning: incompatible implicit declaration of built-in function ‘sprintf’
src/digitemp.c: In function ‘log_counter’:
src/digitemp.c:918: error: ‘time_t’ undeclared (first use in this function)
src/digitemp.c:918: error: expected ‘;’ before ‘mytime’
src/digitemp.c:921: error: ‘mytime’ undeclared (first use in this function)
src/digitemp.c:928: warning: incompatible implicit declaration of built-in function ‘strftime’
src/digitemp.c:928: warning: passing argument 4 of ‘strftime’ makes pointer from integer without a cast
src/digitemp.c:930: warning: incompatible implicit declaration of built-in function ‘strcat’
src/digitemp.c:932: warning: incompatible implicit declaration of built-in function ‘sprintf’
src/digitemp.c: In function ‘log_humidity’:
src/digitemp.c:950: error: ‘time_t’ undeclared (first use in this function)
src/digitemp.c:950: error: expected ‘;’ before ‘mytime’
src/digitemp.c:953: error: ‘mytime’ undeclared (first use in this function)
src/digitemp.c:960: warning: incompatible implicit declaration of built-in function ‘strftime’
src/digitemp.c:960: warning: passing argument 4 of ‘strftime’ makes pointer from integer without a cast
src/digitemp.c:962: warning: incompatible implicit declaration of built-in function ‘strcat’
src/digitemp.c:964: warning: incompatible implicit declaration of built-in function ‘sprintf’
src/digitemp.c: In function ‘show_scratchpad’:
src/digitemp.c:1013: warning: incompatible implicit declaration of built-in function ‘sprintf’
src/digitemp.c:1041: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:1070: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c: In function ‘read_temperature’:
src/digitemp.c:1216: warning: incompatible implicit declaration of built-in function ‘sprintf’
src/digitemp.c:1239: warning: incompatible implicit declaration of built-in function ‘fprintf’
src/digitemp.c:1239: error: ‘stderr’ undeclared (first use in this function)
src/digitemp.c: In function ‘read_counter’:
src/digitemp.c:1275: error: too many arguments to function ‘ReadCounter’
src/digitemp.c:1282: warning: incompatible implicit declaration of built-in function ‘sprintf’
src/digitemp.c:1296: error: too many arguments to function ‘ReadCounter’
src/digitemp.c:1303: warning: incompatible implicit declaration of built-in function ‘sprintf’
src/digitemp.c: In function ‘read_ds2438’:
src/digitemp.c:1336: error: ‘time_t’ undeclared (first use in this function)
src/digitemp.c:1336: error: expected ‘;’ before ‘mytime’
src/digitemp.c:1349: error: ‘mytime’ undeclared (first use in this function)
src/digitemp.c:1352: warning: incompatible implicit declaration of built-in function ‘sprintf’
src/digitemp.c:1355: warning: incompatible implicit declaration of built-in function ‘strftime’
src/digitemp.c:1355: warning: passing argument 4 of ‘strftime’ makes pointer from integer without a cast
src/digitemp.c:1357: warning: incompatible implicit declaration of built-in function ‘strcat’
src/digitemp.c:1359: warning: incompatible implicit declaration of built-in function ‘sprintf’
src/digitemp.c: In function ‘read_device’:
src/digitemp.c:1501: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:1505: warning: incompatible implicit declaration of built-in function ‘memcpy’
src/digitemp.c:1524: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:1528: warning: incompatible implicit declaration of built-in function ‘memcpy’
src/digitemp.c: In function ‘read_rcfile’:
src/digitemp.c:1614: error: ‘FILE’ undeclared (first use in this function)
src/digitemp.c:1614: error: ‘fp’ undeclared (first use in this function)
src/digitemp.c:1636: warning: assignment makes pointer from integer without a cast
src/digitemp.c:1640: warning: assignment makes pointer from integer without a cast
src/digitemp.c:1641: warning: incompatible implicit declaration of built-in function ‘strncpy’
src/digitemp.c:1643: warning: assignment makes pointer from integer without a cast
src/digitemp.c:1646: warning: assignment makes pointer from integer without a cast
src/digitemp.c:1647: warning: incompatible implicit declaration of built-in function ‘strncpy’
src/digitemp.c:1649: warning: assignment makes pointer from integer without a cast
src/digitemp.c:1650: warning: incompatible implicit declaration of built-in function ‘strncpy’
src/digitemp.c:1652: warning: assignment makes pointer from integer without a cast
src/digitemp.c:1653: warning: incompatible implicit declaration of built-in function ‘strncpy’
src/digitemp.c:1655: warning: assignment makes pointer from integer without a cast
src/digitemp.c:1656: warning: incompatible implicit declaration of built-in function ‘strncpy’
src/digitemp.c:1660: warning: assignment makes pointer from integer without a cast
src/digitemp.c:1663: warning: assignment makes pointer from integer without a cast
src/digitemp.c:1669: warning: incompatible implicit declaration of built-in function ‘malloc’
src/digitemp.c:1671: warning: incompatible implicit declaration of built-in function ‘fprintf’
src/digitemp.c:1671: error: ‘stderr’ undeclared (first use in this function)
src/digitemp.c:1678: warning: assignment makes pointer from integer without a cast
src/digitemp.c:1684: warning: assignment makes pointer from integer without a cast
src/digitemp.c:1694: warning: incompatible implicit declaration of built-in function ‘malloc’
src/digitemp.c:1696: warning: incompatible implicit declaration of built-in function ‘fprintf’
src/digitemp.c:1706: warning: incompatible implicit declaration of built-in function ‘exit’
src/digitemp.c:1727: warning: assignment makes pointer from integer without a cast
src/digitemp.c:1732: warning: assignment makes pointer from integer without a cast
src/digitemp.c:1741: warning: assignment makes pointer from integer without a cast
src/digitemp.c:1746: warning: assignment makes pointer from integer without a cast
src/digitemp.c:1759: warning: assignment makes pointer from integer without a cast
src/digitemp.c:1767: warning: assignment makes pointer from integer without a cast
src/digitemp.c:1769: warning: incompatible implicit declaration of built-in function ‘fprintf’
src/digitemp.c:1779: warning: incompatible implicit declaration of built-in function ‘exit’
src/digitemp.c:1785: warning: assignment makes pointer from integer without a cast
src/digitemp.c:1793: warning: assignment makes pointer from integer without a cast
src/digitemp.c:1795: warning: incompatible implicit declaration of built-in function ‘fprintf’
src/digitemp.c:1805: warning: incompatible implicit declaration of built-in function ‘exit’
src/digitemp.c:1811: warning: assignment makes pointer from integer without a cast
src/digitemp.c:1817: warning: incompatible implicit declaration of built-in function ‘fprintf’
src/digitemp.c: In function ‘write_rcfile’:
src/digitemp.c:1853: error: ‘FILE’ undeclared (first use in this function)
src/digitemp.c:1853: error: ‘fp’ undeclared (first use in this function)
src/digitemp.c:1862: warning: incompatible implicit declaration of built-in function ‘fprintf’
src/digitemp.c:1948: error: ‘stderr’ undeclared (first use in this function)
src/digitemp.c: In function ‘printSN’:
src/digitemp.c:1964: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:1967: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c: In function ‘Walk1Wire’:
src/digitemp.c:1983: warning: incompatible implicit declaration of built-in function ‘bzero’
src/digitemp.c:1997: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:2005: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:2007: error: ‘stdout’ undeclared (first use in this function)
src/digitemp.c:2013: warning: incompatible implicit declaration of built-in function ‘fprintf’
src/digitemp.c:2013: error: ‘stderr’ undeclared (first use in this function)
src/digitemp.c:2025: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:2033: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:2041: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:2050: warning: assignment makes pointer from integer without a cast
src/digitemp.c:2052: warning: incompatible implicit declaration of built-in function ‘fprintf’
src/digitemp.c:2064: warning: incompatible implicit declaration of built-in function ‘fprintf’
src/digitemp.c:2076: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:2086: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:2096: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:2103: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:2114: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c: In function ‘Init1WireLan’:
src/digitemp.c:2160: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:2168: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:2170: error: ‘stdout’ undeclared (first use in this function)
src/digitemp.c:2176: warning: incompatible implicit declaration of built-in function ‘fprintf’
src/digitemp.c:2176: error: ‘stderr’ undeclared (first use in this function)
src/digitemp.c:2185: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:2190: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:2202: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:2206: warning: incompatible implicit declaration of built-in function ‘malloc’
src/digitemp.c:2208: warning: incompatible implicit declaration of built-in function ‘fprintf’
src/digitemp.c:2242: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:2249: warning: assignment makes pointer from integer without a cast
src/digitemp.c:2251: warning: incompatible implicit declaration of built-in function ‘fprintf’
src/digitemp.c:2288: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:2295: warning: assignment makes pointer from integer without a cast
src/digitemp.c:2297: warning: incompatible implicit declaration of built-in function ‘fprintf’
src/digitemp.c:2329: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:2336: warning: assignment makes pointer from integer without a cast
src/digitemp.c:2338: warning: incompatible implicit declaration of built-in function ‘fprintf’
src/digitemp.c:2369: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:2383: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:2393: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c: In function ‘main’:
src/digitemp.c:2423: error: ‘time_t’ undeclared (first use in this function)
src/digitemp.c:2423: error: expected ‘;’ before ‘last_time’
src/digitemp.c:2427: error: ‘pid_t’ undeclared (first use in this function)
src/digitemp.c:2427: error: expected ‘;’ before ‘pid’
src/digitemp.c:2431: warning: incompatible implicit declaration of built-in function ‘bzero’
src/digitemp.c:2436: warning: incompatible implicit declaration of built-in function ‘fprintf’
src/digitemp.c:2436: error: ‘stderr’ undeclared (first use in this function)
src/digitemp.c:2462: warning: incompatible implicit declaration of built-in function ‘strcpy’
src/digitemp.c:2483: warning: incompatible implicit declaration of built-in function ‘strncpy’
src/digitemp.c:2501: warning: incompatible implicit declaration of built-in function ‘strncpy’
src/digitemp.c:2507: warning: incompatible implicit declaration of built-in function ‘strncpy’
src/digitemp.c:2544: warning: incompatible implicit declaration of built-in function ‘strlen’
src/digitemp.c:2545: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:2547: warning: incompatible implicit declaration of built-in function ‘strncpy’
src/digitemp.c:2555: warning: incompatible implicit declaration of built-in function ‘strlen’
src/digitemp.c:2556: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:2558: warning: incompatible implicit declaration of built-in function ‘strncpy’
src/digitemp.c:2564: warning: incompatible implicit declaration of built-in function ‘strlen’
src/digitemp.c:2565: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:2567: warning: incompatible implicit declaration of built-in function ‘strncpy’
src/digitemp.c:2577: warning: incompatible implicit declaration of built-in function ‘exit’
src/digitemp.c:2587: warning: incompatible implicit declaration of built-in function ‘fprintf’
src/digitemp.c:2588: warning: incompatible implicit declaration of built-in function ‘exit’
src/digitemp.c:2592: warning: incompatible implicit declaration of built-in function ‘exit’
src/digitemp.c:2601: warning: incompatible implicit declaration of built-in function ‘strncpy’
src/digitemp.c:2605: warning: incompatible implicit declaration of built-in function ‘strncpy’
src/digitemp.c:2612: warning: incompatible implicit declaration of built-in function ‘strncpy’
src/digitemp.c:2617: warning: incompatible implicit declaration of built-in function ‘strncpy’
src/digitemp.c:2621: warning: incompatible implicit declaration of built-in function ‘strncpy’
src/digitemp.c:2627: warning: incompatible implicit declaration of built-in function ‘printf’
src/digitemp.c:2634: error: ‘R_OK’ undeclared (first use in this function)
src/digitemp.c:2634: error: ‘W_OK’ undeclared (first use in this function)
src/digitemp.c:2635: warning: incompatible implicit declaration of built-in function ‘fprintf’
src/digitemp.c:2643: warning: incompatible implicit declaration of built-in function ‘exit’
src/digitemp.c:2698: error: ‘stdout’ undeclared (first use in this function)
src/digitemp.c:2713: warning: incompatible implicit declaration of built-in function ‘exit’
src/digitemp.c:2742: warning: incompatible implicit declaration of built-in function ‘exit’
src/digitemp.c:2775: warning: incompatible implicit declaration of built-in function ‘exit’
src/digitemp.c:2781: error: ‘start_time’ undeclared (first use in this function)
src/digitemp.c:2786: error: ‘last_time’ undeclared (first use in this function)
src/digitemp.c:2795: warning: incompatible implicit declaration of built-in function ‘sprintf’
src/digitemp.c:2834: warning: incompatible implicit declaration of built-in function ‘fprintf’
src/digitemp.c:2867: warning: incompatible implicit declaration of built-in function ‘exit’
make: *** [src/digitemp.o] Error 1

verze 3.3.2

doinstalovaval jsem gcc a make.

Snažil jsem se to vygooglit ale nic srozumitelneho a použitelneho jsem nenašel, jen doinstalovat gcc. Snažil se to ted někdo rozjet:?
Zkoušel jsem i nove verze programu ale chyba je stejná.
Název: Re: teploměr
Přispěvatel: Thomas123 24 Března 2010, 20:48:34
Divím se, že ti to stále nějak nefunguje. Normálně jsem nainstaloval nějaký digitemp z repo a úspěšně měřím. Výsledek si můžeš prohlédnout na http://profiweb.net/teplomer/
Název: Re: teploměr
Přispěvatel: 1x23 26 Března 2010, 10:05:13
nainstaloval jsem tedy z repoz digitemp ale nemůžu nikde najít složku digitemp. Kde se po instalu složka objeví? Potřeboval bych i nečim očuchat port, daval jsem dvě čisla na jeden com port, a nemám to testnuté.
Název: Re: teploměr
Přispěvatel: Thomas123 26 Března 2010, 12:36:43
Složku hledat nemusíš, stačí napsat do terminálu "digitemp_DS9097" a měl by se ti spustit. Jinak spouštěj ho z kořenového adresáře /, protože právě tam se vytvoří ten očuchaný soubor .digitemprc.
Název: Re: teploměr
Přispěvatel: 1x23 13 Dubna 2010, 14:25:43
Ahoj,

tak jsem zkusil číst teplotu, deska intel a com port je normalně vyvedený na desce a čteni funguje.
Na jiném stroji mi čtení nejde, chyba je, že jsem vyvedl com port přes prodloužení, ale toto prodlouženi mi na žádné desce nefunguje, dočetl jsem se, že prodlouženi funguje jen na gigabyte desce. a jsou dva typy prodlouženi com portu na amd a intel.

Setkal se někdo s těmito problémy, má někdo schéma zapojení com portu na intel?

Jak přepájet prodloužení, aby šlo na intelu?

Děkuji za typa:)
Název: Re: teploměr
Přispěvatel: Martin Kiklhorn 13 Dubna 2010, 21:35:42
Používají se ve většině případů dvě zapojení - pohled na plochý kabel u konektoru:

a)
Kód: [Vybrat]
ooooo
         oooo
b)
Kód: [Vybrat]
o o o o o
 o o o o

Jestli to chcete přesně na piny tak si stáhněte manuál k desce.
1) Najděte si zapojení headeru na desce.  Pokud to tam nebude tak si stáhněte manuál k nějaké staré desce stejného výrobce. 
2) Zapojení signálu na konektoru najdete na wikipedii, na tydyt.cz, na hw.cz ...