---
title: "Customized Hotel Room use Serial to Ethernet"
url: "https://maker.wiznet.io/albin_joseph/projects/Customized-Hotel-Room-use-Serial-to-Ethernet/"
markdown_url: "https://maker.wiznet.io/albin_joseph/projects/Customized-Hotel-Room-use-Serial-to-Ethernet/md"
type: "UCC: User Created Content"
author: "albin_joseph"
author_url: "https://maker.wiznet.io/albin_joseph/"
original_author: "albin_joseph"
original_url: "https://www.hackster.io/momososo/customized-hotel-room-use-serial-to-ethernet-91be67"
published: "2020-09-22"
language: "en"
hardware: ["WIZnet WIZ750SR-TTL-EVB Kit", "Resistor 1k ohm", "RGB Diffused Common Cathode", "KL27 mini board", "LEGO MindStorms LEGO Creator Lighthouse Island 5770", "Jumper wires (generic)", "Breadboard (generic)"]
likes: 0
views: 751
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# Customized Hotel Room use Serial to Ethernet

> Customized Hotel Room use Serial to Ethernet

Original author: albin_joseph (source: https://www.hackster.io/momososo/customized-hotel-room-use-serial-to-ethernet-91be67)

## Components

- **WIZnet WIZ750SR-TTL-EVB Kit** x 1
- **Resistor 1k ohm** x 3
- **RGB Diffused Common Cathode** x 1
- **KL27 mini board** x 1
- **LEGO MindStorms LEGO Creator Lighthouse Island 5770** x 1
- **Jumper wires (generic)** x 8
- **Breadboard (generic)** x 1
- Software: **WIZnet wizconfig**
- Software: **sscom**

## Documents and links

- [gpio_led_output.zip](http://maker.wiznet.io/uploads/2020/09/gpio_led_output.zip) (code)
- [KL27 mini board Schematic](http://maker.wiznet.io/uploads/2020/09/kl27_mini_board_schematic_JIMMRjTDeb.pdf) (schematics)

## Article

## Story

***spoiler***?***:***?***A***?***LED***?***control***?***project***

This project is similarly with?[my old project](https://www.hackster.io/momososo/customized-hotel-room-6d5685). BUT this time doesn't need Wi-Fi and cloud to set the room. If hotel room has Ethernet port it can be used directly. Without add independent power port for Wi-Fi device.

### start with WIZ750SR

If you don't know how to use WIZ750SR you can read?[this project](https://www.hackster.io/momososo/start-using-wiz750sr-b1acb3)?and follow it to start.

### Hardware prepare

connect WIZ750SR like this : can be power from DC jack or USB.

![](https://hackster.imgix.net/uploads/attachments/519812/p_20180709_225603_frhZ3CkYdm.jpg?auto=compress%2Cformat&w=740&h=555&fit=max)

connect KL27 mini board like this : it is hard to buy this board I choose it just because it has the RS232 port. See the schematics at the end attachment.

![](https://hackster.imgix.net/uploads/attachments/519815/p_20180709_225614_plXWmJG76i.jpg?auto=compress%2Cformat&w=740&h=555&fit=max)

connect LED like this

![](https://hackster.imgix.net/uploads/attachments/519816/p_20180709_225637_O3UM19430B.jpg?auto=compress%2Cformat&w=740&h=555&fit=max)

### Software prepare

**PC**

wizconfig : setting WIZ750SR to server mode.

sscom : use it TCP client to connect WIZ750SR.

![](https://hackster.imgix.net/uploads/attachments/519821/client_aWgFgOZaQt.jpg?auto=compress%2Cformat&w=740&h=555&fit=max)

**KL27 mini board**

Full code see the attachment at the end. Key point is to receive data and identity it. Here I define data format " XX RR GG BB 0x55 0xAA " . First byte XX is don't care since while I connect with RS232 this byte always receives not current. 2nd to 4th byte are RGB color duty setting. 5th and 6th byte is identity data to make sure data is sending from me. Below is while loop code show UART TX RX.

```
while (1)
{
   /* If RX is idle and g_rxBuffer is empty, start to read data to g_rxBuffer. */
   if (!rxOnGoing)
   {
       if((g_rxBuffer[5]==0xaa) && (g_rxBuffer[4]==0x55)) 
       {
           //data formate " XX RR GG BB 0x55 0xAA " , XX don't care , RR hex Red duty max 100, GG green , BB blue , 0x55 0xAA for identity data 
           LEDdutyR = g_rxBuffer[1];
           LEDdutyG = g_rxBuffer[2];
           LEDdutyB = g_rxBuffer[3];
           if( LEDdutyR > 100) LEDdutyR = 100;
           if( LEDdutyG > 100) LEDdutyG = 100;
           if( LEDdutyB > 100) LEDdutyB = 100;
           TPM_1_pwmSignalParamsUser[1].dutyCyclePercent = LEDdutyR;
           TPM_1_pwmSignalParamsUser[2].dutyCyclePercent = LEDdutyG;
           TPM_1_pwmSignalParamsUser[3].dutyCyclePercent = LEDdutyB;
           TPM_SetupPwm(TPM_1_PERIPHERAL, TPM_1_pwmSignalParamsUser, sizeof(TPM_1_pwmSignalParamsUser) / sizeof(tpm_chnl_pwm_signal_param_t), kTPM_EdgeAlignedPwm, 1000U, TPM_1_CLOCK_SOURCE);
       }
       receiveXfer.data = g_rxBuffer;
       receiveXfer.dataSize = 6;
       LPUART_TransferReceiveNonBlocking(LPUART_0_PERIPHERAL, &g_lpuartHandle, &receiveXfer, NULL);
       rxOnGoing = true;
   }
   if((true==pitch1IsrFlag) &&((!txOnGoing)))
   {
       // keep sending power on time each 1 sec
       pitch1IsrFlag = 0;
       sprintf(g_txBuffer,"time = %urn", runtime);
       sendXfer.data = g_txBuffer;
       sendXfer.dataSize = strlen(g_txBuffer);
       LPUART_TransferSendNonBlocking(LPUART_0_PERIPHERAL, &g_lpuartHandle, &sendXfer);
       txOnGoing = true;
       runtime++;
   }
}
```

### Model house

![](https://hackster.imgix.net/uploads/attachments/520703/model_light_house_XDKYPrpKhc.jpg?auto=compress%2Cformat&w=740&h=555&fit=max)

### Install LED

![](https://hackster.imgix.net/uploads/attachments/520704/install_led_TTcChEC4rC.jpg?auto=compress%2Cformat&w=740&h=555&fit=max)

### Connect internet cable to laptop

![](https://hackster.imgix.net/uploads/attachments/520708/connect_internet_pecwm5Vzno.jpg?auto=compress%2Cformat&w=740&h=555&fit=max)

### Power up

![](https://hackster.imgix.net/uploads/attachments/520709/power_up_7I98I1BiAC.jpg?auto=compress%2Cformat&w=740&h=555&fit=max)

### Use sscom connect WIZ750SR through Ethernet

![](https://hackster.imgix.net/uploads/attachments/520710/sscom_modify_YfFP0Tm3hh.jpg?auto=compress%2Cformat&w=740&h=555&fit=max)

setting Red LED

![](https://hackster.imgix.net/uploads/attachments/520713/setting_red_mmoqB2IpZo.jpg?auto=compress%2Cformat&w=740&h=555&fit=max)

![](https://hackster.imgix.net/uploads/attachments/520715/red_auLAonn57q.jpg?auto=compress%2Cformat&w=740&h=555&fit=max)

setting Green LED

![](https://hackster.imgix.net/uploads/attachments/520717/setting_green_tINm0LLOMS.jpg?auto=compress%2Cformat&w=740&h=555&fit=max)

![](https://hackster.imgix.net/uploads/attachments/520718/green_lnNsudC5UI.jpg?auto=compress%2Cformat&w=740&h=555&fit=max)

setting Blue LED

![](https://hackster.imgix.net/uploads/attachments/520719/setting_blue_GUUmLFF9dO.jpg?auto=compress%2Cformat&w=740&h=555&fit=max)

![](https://hackster.imgix.net/uploads/attachments/520720/blue_lF9F0hnYlA.jpg?auto=compress%2Cformat&w=740&h=555&fit=max)

White ( send "aa 64 64 64 55 aa" )

![](https://hackster.imgix.net/uploads/attachments/520722/white_T6OSYSSsuU.jpg?auto=compress%2Cformat&w=740&h=555&fit=max)

### Conclusion

**When I control LED, I can control anything.benefit when use wiz750sr**

1. Doesn't need cloud server.

2. Easy setting through RS232/RS485/TTL.

3. Use Ethernet port stable signal and high speed.

---

Source: https://maker.wiznet.io/albin_joseph/projects/Customized-Hotel-Room-use-Serial-to-Ethernet/
