Example of use: myEthernet with myTWI temperature sensor

Project

    The myEthernet can also communicate with the myTWI add-ons. In this example the ambient temperature should be displayed on a website with help of the myTWI add-on temperature sensor.

    The pins from 200 until 207 of the myEthernet are virtual pins which can be used for the request till 8 myTWI add-ons temperature sensor.

Required hardware

    Which pin number you have to take in the source code is defined by the address jumper on the myTWI add-on temperature sensor. Pin 200 is used when all address jumper are on 0. Pin 207 is used when all address jumpers are on 1.
    When you click on the link "Configurate" then pin 200 is so configured that the myEthernet can receives data from the myTWI add-on temperature sensor via TWI. Please pay attention that the pullup resistors are activated. The jumper must be plugged. If you use more than one TWI add-on then the pullup resistors must be activated only on one TWI add-on.

    The expression v200~lm75 is replaced by the value of the ambient temperature in degree Celsius. lm75 tells the web server that it should display the output as temperature with the place after the comma. Without these information you would see the temperature in half degrees. That means instead of 24,0C you would see 48C.

Procedure

    Step 1:
    Create a HTM-file with the name temp.htm.

    Step 2:
    Write the following source code in it.

    Step 3:
    Copy the file on the microSD-card.

    Step 4:
    Insert the microSD-card in the myEthernet, connect the power supply on the myEthernet and connect it via the network cable with a PC.

    Step 5:
    Connect the myTWI add-on temperature sensor with the myEthernet like it is shown in the picture.

    Step 6:
    Open a page in a web browser. Write in the address line the IP address and the name of the htm-file e.g. http://192.168.178.96/temp.htm

    After you had configured the pin 200 for the myTWI add-on temperature sensor then you see the current temperature. When you put your finger on the temperature sensor or something hot then you see how the temperature rises. Pay attention that you have to actualize the page manual.

Downloads

Shopping list:


««« Back to the picture gallery  

Our regional partners

Business partner wanted!

To expand our sales area we are looking for partners to represent our products and interests of the Laser & Co. Solutions GmbH.

mySmartUSB MK2

For beginners

For professionals