ネットワークシステム20101125菅埜諒介

18
ネネネネネネネネネネ ネネ ネネ ネ ネネ ネ ネ 221125 ネネネネネネネ ネネネネ 19

description

 

Transcript of ネットワークシステム20101125菅埜諒介

  • 1.
  • 2. Arduino Arduino Arduino
  • 3.
    • Arduino
  • 4.
    • Fedora13 Web
    • fedora13
    • Apache
    • PHP
  • 5. Apache
    • # /var/www/html/test.php
    • test.php
    • OK
    1 test.php
  • 6. Apache
    • # php.ini
    • [root@lucen /]vi /etc/php.ini
    • error_reporting = E_ALL
    • display_errors = On
    • # Apache
    • [root@lucen /]
    • /usr/sbin/apachectl restart
    • Apache ( )
    • vi
  • 7.
    • Arduino
    • temp_write.php
    • data.txt
    • Web
    2
  • 8.
    • data.txt
    • print_ip.php
    • IP
    • PHP
    • temp_write.php
    • Arduino
    • data.txt
    3
  • 9. IP -print_ip.php 4 print_ip.php
  • 10. -temp_write.php
  • 11. 2.Arduino
    • Arduino
    • Duemilanove
    • Ethernet
    • LM61
    LM61 5 Arduino
  • 12. Arduino
    • Ethernet MAC
    • USB
    • LAN
    6 Aduino
  • 13. Arduino
    • #include //
    • #include
    • #include
    • #define PORT 80 //www 80
    • byte mac[] =
    • { 0x90, 0xA2, 0xDA, 0x00, 0x0D, 0x42 }; //Ethernet mac
    • byte ip[] = {160, 18, 8, 158 }; //Arduino IP
    • byte server[] = // IP
    • { 160,18,8,156 };
    • // IP
    • Client client = Client(server, PORT);
    • Ethernet.begin(mac, ip); //Ethernet
  • 14. Arduino
    • A_val = analogRead( A_inPin ); // (8bit A/DC)
    • // web PHP GET
    • // 'temp'
    • client.write("GET /temp_write.php?temp=");
    • client.print(tempC, DEC);
    • client.write(" HTTP/1.1n");
    • client.write("HOST:160.18.8.156nn");
    • //
    • client.stop();
  • 15. temp_write.php
    • data.txt
    • 0.0
    7 temp_write.php
  • 16.
    • chown [-f] [-R]
    • {OWN[:GRP]|:GRP} FILE
    • chown apache /var/.data.txt
    • chmod (option) [a+w] [file name]
    • chmod R 777 /var/..data.txt
    • apache
    • root
    • 777 [ r ]
    • [ w ]
    • [ x ]
  • 17. data.txt
    • 20
    • Arduino
    • 3
    8 data.txt
  • 18. Arduino Arduino