LED Controller via Ethernet with KSDK 2.0 and FreeRTOS

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LED Controller via Ethernet with KSDK 2.0 and FreeRTOS

LED Controller via Ethernet with KSDK 2.0 and FreeRTOS

What is needed:

SW:

  • KDS 3.2
  • KSDK 2.0
  • Hercules
  • (Visual Studio 2015)

 

HW:

  • FRDM-K64F
  • Ethernet Cable

 

Install KSDK 2.0

Be sure, that you have downloaded correct package KSDK 2.0 for FRDM-K64F, for all procedure please follow instructions mentioned at How to: install KSDK 2.0

 

Install KDS 3.2

Be sure, that you will work with the newest Kinetis Design Studio v.3.2, please see New Kinetis Design Studio v3.2.0 available for more details.

149416_149416.pngKDS.png

 

Import demo example

For start with this example we will build on existing demo project, located under

C:\Freescale\<ksdk2.0_package>\boards\frdmk64f\demo_apps\lwip\lwip_tcpecho\freertos\kds

Please, import this example according to the procedure described at How to: import example in KSDK

 

Start with programming

Let´s start with programming example for LED RGB controlling via ethernet

 

Checking and parsing incoming packets

This packet is divided into header and data. The header represents first two bytes and the remaining three bytes are occupied by data. The zero byte is 0xFF and the first byte must be 0x00. The second byte represents red color, the third byte green color and the last fourth byte presents blue color.

149436_149436.pngfram_final.png

lwip_tcpecho_freertos.c

Server is listening on port 7 and waiting for a connection from the client. If the client sends 5B, it find out according to header whether it is correct 5B. If so, each RGB parts will be parsed individually and set the LED accordingly.

 

    while (1)     {         /* Grab new connection. */         err = netconn_accept(conn, &newconn);         /* Process the new connection. */         if (err == ERR_OK)         {             struct netbuf *buf;             u8_t *data;             u16_t len;               while ((err = netconn_recv(newconn, &buf)) == ERR_OK)             {                 do                 {                     netbuf_data(buf, &data, &len);                     if(len==5){                         if(data[0]==0xFF && data[1]==0x00){                             if(data[2]>0){                                 LED_RED_ON();                             }else {                                 LED_RED_OFF();                             }                             if(data[3]>0){                                 LED_GREEN_ON();                             }else {                                 LED_GREEN_OFF();                             }                             if(data[4]>0){                                 LED_BLUE_ON();                             }else {                                 LED_BLUE_OFF();                             }                             //err = netconn_write(newconn, "ok", 2, NETCONN_COPY);                         }                     }                 } while (netbuf_next(buf) >= 0);                 netbuf_delete(buf);             }             /* Close connection and discard connection identifier. */             netconn_close(newconn);             netconn_delete(newconn);         }     } 

 

Initializing LEDs

 

It is needed to set all LEDs in pin_mux.c in BOARD_InitPins() function and initialize in lwip_tcpecho_freertos.c in main() function.

 

pin_mux.c

Go to BOARD_InitPins() and at the end of the function add these lines:

149445_149445.pnginit_leds_0.png

Copy and paste to your project

    CLOCK_EnableClock(kCLOCK_PortB);     CLOCK_EnableClock(kCLOCK_PortE);     PORT_SetPinMux(PORTB, 21U, kPORT_MuxAsGpio);     PORT_SetPinMux(PORTB, 22U, kPORT_MuxAsGpio);     PORT_SetPinMux(PORTE, 26U, kPORT_MuxAsGpio);

 

lwip_tcpecho_freertos.c

Go to main() and initialize LEDs

149446_149446.pnginit_leds.png

Copy and paste to your project

LED_RED_INIT(LOGIC_LED_OFF); LED_GREEN_INIT(LOGIC_LED_OFF); LED_BLUE_INIT(LOGIC_LED_OFF);

Set up connection on PC site

Set PC on 192.168.1.100

149449_149449.pngip_address.png

 

Controlling the application

Hercules

For test connection you can use Hercules. After testing don´t forget disconnect Hercules, server can handle only one TCP connection.

IP Address of the board is set on 192.168.1.102

149451_149451.pnghercules.png

It works - the board is green lighting:

149452_149452.jpgFullSizeRender.jpg

 

Visualization in Visual Studio 2015

For better controlling we will create application in Visual Studio 2015.

Start with new project and create new form according this:

149453_149453.pngLED CONTROLLER.png

 

And set functionality for all items.

Client connects to the IP Address on port 7 and sends our packet according selected colour.

For red color are data set on { 0xFF, 0x00, 1, 0, 0 };, for yellow { 0xFF, 0x00, 1, 1, 0 }; etc.

 

Form1.cs

public partial class Form1 : Form     {         Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);          public Form1()         {             InitializeComponent();                      }          private void button1_Click(object sender, EventArgs e)         {             try              {                 s.Connect(IPAddress.Parse(textBox1.Text), 7);                 byte[] data = { 0xFF, 0x00, 0, 0, 0 };                 groupBox1.Enabled = true;                 button1.Enabled = false;                 s.Send(data);                  textBox1.Enabled = false;             }             catch              {                 MessageBox.Show("Connection failed");             }         }          private void button_red_Click(object sender, EventArgs e)         {             if (s.Connected) {                 byte[] data = { 0xFF, 0x00, 1, 0, 0 };                 s.Send(data);             }         }          private void button_green_Click(object sender, EventArgs e)         {             if (s.Connected)             {                 byte[] data = { 0xFF, 0x00, 0, 1, 0 };                 s.Send(data);             }         }          private void button_blue_Click(object sender, EventArgs e)         {             if (s.Connected)             {                 byte[] data = { 0xFF, 0x00, 0, 0, 1 };                 s.Send(data);             }         }          private void button_black_Click(object sender, EventArgs e)         {             if (s.Connected)             {                 byte[] data = { 0xFF, 0x00, 0, 0, 0 };                 s.Send(data);             }         }          private void button_white_Click(object sender, EventArgs e)         {             if (s.Connected)             {                 byte[] data = { 0xFF, 0x00, 1, 1, 1 };                 s.Send(data);             }         }          private void button_cyan_Click(object sender, EventArgs e)         {             if (s.Connected)             {                 byte[] data = { 0xFF, 0x00, 0, 1, 1 };                 s.Send(data);             }         }          private void button_magenta_Click(object sender, EventArgs e)         {             if (s.Connected)             {                 byte[] data = { 0xFF, 0x00, 1, 0, 1 };                 s.Send(data);             }         }          private void button_yellow_Click(object sender, EventArgs e)         {             if (s.Connected)             {                 byte[] data = { 0xFF, 0x00, 1, 1, 0 };                 s.Send(data);             }         }     }

 

 

Enjoy!

 

Iva

ラベル(1)
添付
%3CLINGO-SUB%20id%3D%22lingo-sub-1122608%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EKSDK%202.0%20%E3%81%A8%20FreeRTOS%20%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%9F%E3%82%A4%E3%83%BC%E3%82%B5%E3%83%8D%E3%83%83%E3%83%88%E7%B5%8C%E7%94%B1%E3%81%AE%20LED%20%E3%82%B3%E3%83%B3%E3%83%88%E3%83%AD%E3%83%BC%E3%83%A9%E3%83%BC%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1122608%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3Dutf-8%22%20%2F%26gt%3B%0A%3CH2%20id%3D%22toc-hId--1414553986%22%20id%3D%22toc-hId--1414553986%22%20id%3D%22toc-hId--493627470%22%3E%E5%BF%85%E8%A6%81%E3%81%AA%E3%82%82%E3%81%AE%3A%3C%2FH2%3E%3CP%3ESW%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3CUL%3E%3CLI%3EKDS%203.2%3C%2FLI%3E%3CLI%3EKSDK%202.0%20(%E8%8B%B1%E8%AA%9E)%3C%2FLI%3E%3CLI%3E%E3%83%98%E3%83%AB%E3%82%AF%E3%83%AC%E3%82%B9%E5%BA%A7%3C%2FLI%3E%3CLI%3E(Visual%20Studio%202015)%20(%E8%8B%B1%E8%AA%9E)%3C%2FLI%3E%3C%2FUL%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E3%83%8F%E3%83%BC%E3%83%89%E3%82%A6%E3%82%A7%E3%82%A2%EF%BC%9A%3C%2FP%3E%3CUL%3E%3CLI%3EFRDM-K64F%3C%2FLI%3E%3CLI%3EEthernet%E3%82%B1%E3%83%BC%E3%83%96%E3%83%AB%3C%2FLI%3E%3C%2FUL%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CH2%20id%3D%22toc-hId-1072958847%22%20id%3D%22toc-hId-1072958847%22%20id%3D%22toc-hId-1993885363%22%3EKSDK%202.0%20%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%3C%2FH2%3E%3CP%3EFRDM-K64F%E7%94%A8%E3%81%AE%E6%AD%A3%E3%81%97%E3%81%84%E3%83%91%E3%83%83%E3%82%B1%E3%83%BC%E3%82%B8KSDK%202.0%E3%82%92%E3%83%80%E3%82%A6%E3%83%B3%E3%83%AD%E3%83%BC%E3%83%89%E3%81%97%E3%81%9F%E3%81%93%E3%81%A8%E3%82%92%E7%A2%BA%E8%AA%8D%E3%81%97%E3%81%A6%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84%E3%80%82%E3%81%99%E3%81%B9%E3%81%A6%E3%81%AE%E6%89%8B%E9%A0%86%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6%E3%81%AF%E3%80%81%3CA%20_jive_internal%3D%22true%22%20data-containerid%3D%2211234%22%20data-containertype%3D%2214%22%20data-objectid%3D%22329744%22%20data-objecttype%3D%22102%22%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fdocs%2FDOC-329744%22%20target%3D%22_blank%22%3EKSDK%202.0%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E6%96%B9%E6%B3%95%3C%2FA%3E%E3%81%AB%E8%A8%98%E8%BC%89%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%82%8B%E6%89%8B%E9%A0%86%E3%81%AB%E5%BE%93%E3%81%A3%E3%81%A6%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84%3C%2FP%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CH2%20id%3D%22toc-hId--734495616%22%20id%3D%22toc-hId--734495616%22%20id%3D%22toc-hId-186430900%22%3EKDS%203.2%20%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%3C%2FH2%3E%3CP%3E%E6%9C%80%E6%96%B0%E3%81%AEKinetis%20Design%20Studio%20v.3.2%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B%E5%A0%B4%E5%90%88%E3%81%AF%E3%80%81%20%3CA%20_jive_internal%3D%22true%22%20data-containerid%3D%2211213%22%20data-containertype%3D%2214%22%20data-objectid%3D%22330211%22%20data-objecttype%3D%22102%22%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fdocs%2FDOC-330211%22%20target%3D%22_blank%22%3E%E6%96%B0%E3%81%97%E3%81%84Kinetis%20Design%20Studio%20v3.2.0%3C%2FA%3E%20%E3%82%92%E5%8F%82%E7%85%A7%E3%81%97%E3%81%A6%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84%E3%80%82%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22149416_149416.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22149416_149416.png%22%20style%3D%22width%3A%20689px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F118346i0FE9D97C504D7B00%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22149416_149416.png%22%20alt%3D%22149416_149416.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22KDS.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22KDS.png%22%20style%3D%22width%3A%20689px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111642i0408F3A6F495A673%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22KDS.png%22%20alt%3D%22KDS.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CH2%20id%3D%22toc-hId-1753017217%22%20id%3D%22toc-hId-1753017217%22%20id%3D%22toc-hId--1621023563%22%3E%E3%83%87%E3%83%A2%E3%81%AE%E3%82%A4%E3%83%B3%E3%83%9D%E3%83%BC%E3%83%88%E4%BE%8B%3C%2FH2%3E%3CP%3E%E3%81%93%E3%81%AE%E4%BE%8B%E3%81%8B%E3%82%89%E5%A7%8B%E3%82%81%E3%82%8B%E3%81%AB%E3%81%AF%E3%80%81%E4%BB%A5%E4%B8%8B%E3%81%AB%E3%81%82%E3%82%8B%E6%97%A2%E5%AD%98%E3%81%AE%E3%83%87%E3%83%A2%E3%83%97%E3%83%AD%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%81%AB%E5%9F%BA%E3%81%A5%E3%81%84%E3%81%A6%E3%83%93%E3%83%AB%E3%83%89%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%3CEM%3EC%3A%5C%E3%83%95%E3%83%AA%E3%83%BC%E3%82%B9%E3%82%B1%E3%83%BC%E3%83%AB%5C%3CKSDK2.0_PACKAGE%3E%5C%E3%83%9C%E3%83%BC%E3%83%89%5Cfrdmk64f%5Cdemo_apps%5Clwip%5Clwip_tcpecho%5Cfreertos%5Ckds%3C%2FKSDK2.0_PACKAGE%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%E3%81%93%E3%81%AE%E4%BE%8B%E3%82%92%E3%82%A4%E3%83%B3%E3%83%9D%E3%83%BC%E3%83%88%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%80%81%E3%80%8C%3CA%20_jive_internal%3D%22true%22%20data-containerid%3D%2211234%22%20data-containertype%3D%2214%22%20data-objectid%3D%22331251%22%20data-objecttype%3D%22102%22%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fdocs%2FDOC-331251%22%20target%3D%22_blank%22%3E%E6%96%B9%E6%B3%95%3A%20KSDK%20%E3%81%A7%E4%BE%8B%E3%82%92%E3%82%A4%E3%83%B3%E3%83%9D%E3%83%BC%E3%83%88%E3%81%99%E3%82%8B%3C%2FA%3E%E3%80%8D%E3%81%A7%E8%AA%AC%E6%98%8E%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%82%8B%E6%89%8B%E9%A0%86%E3%81%AB%E5%BE%93%E3%81%A3%E3%81%A6%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84%E3%80%82%3C%2FP%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CH2%20id%3D%22toc-hId--54437246%22%20id%3D%22toc-hId--54437246%22%20id%3D%22toc-hId-866489270%22%3E%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0%E3%81%8B%E3%82%89%E5%A7%8B%E3%82%81%E3%82%8B%3C%2FH2%3E%3CP%3E%E3%82%A4%E3%83%BC%E3%82%B5%E3%83%8D%E3%83%83%E3%83%88%E3%82%92%E4%BB%8B%E3%81%97%E3%81%9FLEDRGB%E5%88%B6%E5%BE%A1%E3%81%AE%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0%E4%BE%8B%E3%81%8B%E3%82%89%E5%A7%8B%E3%82%81%E3%81%BE%E3%81%97%E3%82%87%E3%81%86%3C%2FP%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CH3%20id%3D%22toc-hId-636124228%22%20id%3D%22toc-hId-636124228%22%20id%3D%22toc-hId-1557050744%22%3E%E7%9D%80%E4%BF%A1%E3%83%91%E3%82%B1%E3%83%83%E3%83%88%E3%81%AE%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF%E3%81%A8%E8%A7%A3%E6%9E%90%3C%2FH3%3E%3CP%3E%E3%81%93%E3%81%AE%E3%83%91%E3%82%B1%E3%83%83%E3%83%88%E3%81%AF%E3%83%98%E3%83%83%E3%83%80%E3%83%BC%E3%81%A8%E3%83%87%E3%83%BC%E3%82%BF%E3%81%AB%E5%88%86%E5%89%B2%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%E3%83%98%E3%83%83%E3%83%80%E3%83%BC%E3%81%AF%E6%9C%80%E5%88%9D%E3%81%AE%202%20%E3%83%90%E3%82%A4%E3%83%88%E3%82%92%E8%A1%A8%E3%81%97%E3%80%81%E6%AE%8B%E3%82%8A%E3%81%AE%203%20%E3%83%90%E3%82%A4%E3%83%88%E3%81%AF%E3%83%87%E3%83%BC%E3%82%BF%E3%81%AB%E3%82%88%E3%81%A3%E3%81%A6%E5%8D%A0%E3%82%81%E3%82%89%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%E3%82%BC%E3%83%AD%E3%83%90%E3%82%A4%E3%83%88%E3%81%AF%200xFF%20%E3%83%90%E3%82%A4%E3%83%88%E3%81%A7%E3%80%81%E6%9C%80%E5%88%9D%E3%81%AE%E3%83%90%E3%82%A4%E3%83%88%E3%81%AF%200x00%20%E3%83%90%E3%82%A4%E3%83%88%E3%81%A7%E3%81%AA%E3%81%91%E3%82%8C%E3%81%B0%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%9B%E3%82%93%E3%80%822%20%E7%95%AA%E7%9B%AE%E3%81%AE%E3%83%90%E3%82%A4%E3%83%88%E3%81%AF%E8%B5%A4%E8%89%B2%E3%80%813%20%E7%95%AA%E7%9B%AE%E3%81%AE%E3%83%90%E3%82%A4%E3%83%88%E3%81%AF%E7%B7%91%E8%89%B2%E3%80%81%E6%9C%80%E5%BE%8C%E3%81%AE%204%20%E7%95%AA%E7%9B%AE%E3%81%AE%E3%83%90%E3%82%A4%E3%83%88%E3%81%AF%E9%9D%92%E8%89%B2%E3%82%92%E8%A1%A8%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22149436_149436.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22149436_149436.png%22%20style%3D%22width%3A%20850px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F118347i044D5EE39E620FC0%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22149436_149436.png%22%20alt%3D%22149436_149436.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22fram_final.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22fram_final.png%22%20style%3D%22width%3A%20850px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111643iB407531803788CF5%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22fram_final.png%22%20alt%3D%22fram_final.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CEM%3Elwip_tcpecho_freertos.c%3C%2FEM%3E%3C%2FP%3E%3CP%3E%E3%82%B5%E3%83%BC%E3%83%90%E3%83%BC%E3%81%AF%E3%83%9D%E3%83%BC%E3%83%88%207%20%E3%81%A7%E3%83%AA%E3%83%83%E3%82%B9%E3%83%B3%E3%81%97%E3%80%81%E3%82%AF%E3%83%A9%E3%82%A4%E3%82%A2%E3%83%B3%E3%83%88%E3%81%8B%E3%82%89%E3%81%AE%E6%8E%A5%E7%B6%9A%E3%82%92%E5%BE%85%E6%A9%9F%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%E3%82%AF%E3%83%A9%E3%82%A4%E3%82%A2%E3%83%B3%E3%83%88%E3%81%8C5B%E3%82%92%E9%80%81%E4%BF%A1%E3%81%99%E3%82%8B%E3%81%A8%E3%80%81%E3%83%98%E3%83%83%E3%83%80%E3%83%BC%E3%81%AB%E5%BE%93%E3%81%A3%E3%81%A6%E6%AD%A3%E3%81%97%E3%81%845B%E3%81%A7%E3%81%82%E3%82%8B%E3%81%8B%E3%81%A9%E3%81%86%E3%81%8B%E3%81%8C%E3%82%8F%E3%81%8B%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%E3%81%9D%E3%81%AE%E5%A0%B4%E5%90%88%E3%80%81%E5%90%84%20RGB%20%E3%83%91%E3%83%BC%E3%83%84%E3%81%AF%E5%80%8B%E5%88%A5%E3%81%AB%E8%A7%A3%E6%9E%90%E3%81%95%E3%82%8C%E3%80%81%E3%81%9D%E3%82%8C%E3%81%AB%E5%BF%9C%E3%81%98%E3%81%A6%20LED%20%E3%81%8C%E8%A8%AD%E5%AE%9A%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22java%22%20name%3D%22code%22%3Ewhile%20(1)%20%7B%20%2F*%20%E6%96%B0%E3%81%97%E3%81%84%E6%8E%A5%E7%B6%9A%E3%82%92%E3%81%A4%E3%81%8B%E3%81%BF%E3%81%BE%E3%81%99%E3%80%82*%2F%20err%20%3D%20netconn_accept(conn%2C%20%26amp%3Bnewconn)%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F*%20%E6%96%B0%E3%81%97%E3%81%84%E6%8E%A5%E7%B6%9A%E3%82%92%E5%87%A6%E7%90%86%E3%81%97%E3%81%BE%E3%81%99%E3%80%82*%2F%20if%20(err%20%3D%3D%20ERR_OK)%20%7B%20struct%20netbuf%20*buf%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20u8_t%20*%E3%83%87%E3%83%BC%E3%82%BF%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20u16_t%E3%83%AC%E3%83%B3%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20while%20((err%20%3D%20netconn_recv(NewConn%2C%20%26amp%3Bbuf))%20%3D%3D%20ERR_OK)%20%7B%20do%20%7B%20netbuf_data(buf%2C%20%26amp%3Bdata%2C%20%26amp%3Blen)%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if(len%3D%3D5)%7B%20if(data%5B0%5D%3D%3D0xFF%20%26amp%3B%20data%5B1%5D%3D%3D0x00)%7B%20if(data%5B2%5D%26gt%3B0)%7B%20LED_RED_ON()%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7Delse%20%7B%20LED_RED_OFF()%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20if(data%5B3%5D%26gt%3B0)%7B%20LED_GREEN_ON()%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7Delse%20%7B%20LED_GREEN_OFF()%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20if(data%5B4%5D%26gt%3B0)%7B%20LED_BLUE_ON()%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7Delse%20%7B%20LED_BLUE_OFF()%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20%2F%2Ferr%20%3D%20netconn_write(newconn%2C%20%22ok%22%2C%202%2C%20NETCONN_COPY)%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20%7D%20%7D%20%7D%20while%20(netbuf_next(buf)%20%26gt%3B%3D%200)%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20netbuf_delete(buf)%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20%2F*%20%E6%8E%A5%E7%B6%9A%E3%82%92%E9%96%89%E3%81%98%E3%80%81%E6%8E%A5%E7%B6%9A%E8%AD%98%E5%88%A5%E5%AD%90%E3%82%92%E7%A0%B4%E6%A3%84%E3%81%97%E3%81%BE%E3%81%99%E3%80%82*%20%2F%20netconn_close(%E3%83%8B%E3%83%A5%E3%83%BC%E3%82%B3%E3%83%B3)%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20netconn_delete(%E3%83%8B%E3%83%A5%E3%83%BC%E3%82%B3%E3%83%B3)%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20%3C%2FPRE%3E%3CDIV%20style%3D%22display%3Anone%3B%22%3E%20%3C%2FDIV%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CH3%20id%3D%22toc-hId--1171330235%22%20id%3D%22toc-hId--1171330235%22%20id%3D%22toc-hId--250403719%22%3ELED%20%E3%81%AE%E5%88%9D%E6%9C%9F%E5%8C%96%3C%2FH3%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBOARD_InitPins()%E9%96%A2%E6%95%B0%E3%81%A7pin_mux.c%E3%81%AE%E3%81%99%E3%81%B9%E3%81%A6%E3%81%AELED%E3%82%92%E8%A8%AD%E5%AE%9A%E3%81%97%E3%80%81main()%E9%96%A2%E6%95%B0%E3%81%A7lwip_tcpecho_freertos.c%E3%81%A7%E5%88%9D%E6%9C%9F%E5%8C%96%E3%81%99%E3%82%8B%E5%BF%85%E8%A6%81%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3Epin_mux.c%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EBOARD_InitPins()%3C%2FSTRONG%3E%20%E3%81%AB%E7%A7%BB%E5%8B%95%E3%81%97%E3%80%81%E9%96%A2%E6%95%B0%E3%81%AE%E6%9C%80%E5%BE%8C%E3%81%AB%E6%AC%A1%E3%81%AE%E8%A1%8C%E3%82%92%E8%BF%BD%E5%8A%A0%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22149445_149445.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22149445_149445.png%22%20style%3D%22width%3A%20548px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F118348i4B86FB5B8FF32EC8%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22149445_149445.png%22%20alt%3D%22149445_149445.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22init_leds_0.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22init_leds_0.png%22%20style%3D%22width%3A%20548px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111644iEFF8609EF968C575%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22init_leds_0.png%22%20alt%3D%22init_leds_0.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%E3%82%B3%E3%83%94%E3%83%BC%E3%81%97%E3%81%A6%E3%83%97%E3%83%AD%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%81%AB%E8%B2%BC%E3%82%8A%E4%BB%98%E3%81%91%E3%81%BE%E3%81%99%3C%2FP%3E%3CPRE%20class%3D%22java%22%20name%3D%22code%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20CLOCK_EnableClock(kCLOCK_PortB)%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20CLOCK_EnableClock(kCLOCK_PortE)%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20PORT_SetPinMux(PORTB%2C%2021U%2C%20kPORT_MuxAsGpio)%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20PORT_SetPinMux(PORTB%2C%2022U%2C%20kPORT_MuxAsGpio)%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20PORT_SetPinMux(PORTE%2C%2026U%2C%20kPORT_MuxAsGpio)%3B%3C%2FPRE%3E%3CDIV%20style%3D%22display%3Anone%3B%22%3E%20%3C%2FDIV%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3Elwip_tcpecho_freertos.c%3C%2FEM%3E%3C%2FP%3E%3CP%3Emain()%20%E3%81%AB%E7%A7%BB%E5%8B%95%E3%81%97%E3%80%81LED%20%E3%82%92%E5%88%9D%E6%9C%9F%E5%8C%96%E3%81%97%E3%81%BE%E3%81%99%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22149446_149446.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22149446_149446.png%22%20style%3D%22width%3A%20720px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F118349iC925095C9407D8F0%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22149446_149446.png%22%20alt%3D%22149446_149446.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22init_leds.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22init_leds.png%22%20style%3D%22width%3A%20720px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111645i285C1AFB2D917049%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22init_leds.png%22%20alt%3D%22init_leds.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%E3%82%B3%E3%83%94%E3%83%BC%E3%81%97%E3%81%A6%E3%83%97%E3%83%AD%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%81%AB%E8%B2%BC%E3%82%8A%E4%BB%98%E3%81%91%E3%81%BE%E3%81%99%3C%2FP%3E%3CPRE%20class%3D%22java%22%20name%3D%22code%22%3ELED_RED_INIT(LOGIC_LED_OFF)%3BLED_GREEN_INIT(LOGIC_LED_OFF)%3BLED_BLUE_INIT(LOGIC_LED_OFF)%3B%3C%2FPRE%3E%3CDIV%20style%3D%22display%3Anone%3B%22%3E%20%3C%2FDIV%3E%3CH2%20id%3D%22toc-hId--1181833339%22%20id%3D%22toc-hId--1181833339%22%20id%3D%22toc-hId--260906823%22%3E%3C%2FH2%3E%3CH3%20id%3D%22toc-hId--491271865%22%20id%3D%22toc-hId--491271865%22%20id%3D%22toc-hId-429654651%22%3EPC%E3%82%B5%E3%82%A4%E3%83%88%E3%81%A7%E6%8E%A5%E7%B6%9A%E3%82%92%E8%A8%AD%E5%AE%9A%E3%81%99%E3%82%8B%3C%2FH3%3E%3CP%3EPC%E3%82%92192.168.1.100%E3%81%AB%E8%A8%AD%E5%AE%9A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22149449_149449.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22149449_149449.png%22%20style%3D%22width%3A%20414px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F118350i6F52EC991C8DD0CA%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22149449_149449.png%22%20alt%3D%22149449_149449.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ip_address.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ip_address.png%22%20style%3D%22width%3A%20414px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111646iEEDCA6A393B04F82%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22ip_address.png%22%20alt%3D%22ip_address.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CH2%20id%3D%22toc-hId--501774969%22%20id%3D%22toc-hId--501774969%22%20id%3D%22toc-hId-419151547%22%3E%E3%82%A2%E3%83%97%E3%83%AA%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%AE%E5%88%B6%E5%BE%A1%3C%2FH2%3E%3CH3%20id%3D%22toc-hId--506376974%22%20id%3D%22toc-hId--506376974%22%20id%3D%22toc-hId-414549542%22%3E%E3%83%98%E3%83%AB%E3%82%AF%E3%83%AC%E3%82%B9%E5%BA%A7%3C%2FH3%3E%3CP%3E%E3%83%86%E3%82%B9%E3%83%88%E6%8E%A5%E7%B6%9A%E3%81%AB%E3%81%AF%E3%80%81Hercules%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%99%E3%80%82%E3%83%86%E3%82%B9%E3%83%88%E5%BE%8C%E3%80%81Hercules%E3%82%92%E5%88%87%E6%96%AD%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%82%92%E5%BF%98%E3%82%8C%E3%81%AA%E3%81%84%E3%81%A7%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84%E3%80%81%E3%82%B5%E3%83%BC%E3%83%90%E3%83%BC%E3%81%AF1%E3%81%A4%E3%81%AETCP%E6%8E%A5%E7%B6%9A%E3%81%AE%E3%81%BF%E3%82%92%E5%87%A6%E7%90%86%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%E3%83%9C%E3%83%BC%E3%83%89%E3%81%AEIP%E3%82%A2%E3%83%89%E3%83%AC%E3%82%B9%E3%81%AF192.168.1.102%E3%81%AB%E8%A8%AD%E5%AE%9A%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22149451_149451.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22149451_149451.png%22%20style%3D%22width%3A%20637px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F118351iD410BE51CF44F999%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22149451_149451.png%22%20alt%3D%22149451_149451.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hercules.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hercules.png%22%20style%3D%22width%3A%20637px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111647i0B196C83052A7554%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22hercules.png%22%20alt%3D%22hercules.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%E3%81%9D%E3%82%8C%E3%81%AF%E6%A9%9F%E8%83%BD%E3%81%97%E3%81%BE%E3%81%99-%E3%83%9C%E3%83%BC%E3%83%89%E3%81%AF%E7%B7%91%E8%89%B2%E3%81%AE%E7%85%A7%E6%98%8E%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22149452_149452.jpg%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22149452_149452.jpg%22%20style%3D%22width%3A%20640px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F118352i117C6C77DEA19EF3%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22149452_149452.jpg%22%20alt%3D%22149452_149452.jpg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22FullSizeRender.jpg%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22FullSizeRender.jpg%22%20style%3D%22width%3A%20640px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111648iAEB21BC941A09769%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22FullSizeRender.jpg%22%20alt%3D%22FullSizeRender.jpg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CH3%20id%3D%22toc-hId-1981135859%22%20id%3D%22toc-hId-1981135859%22%20id%3D%22toc-hId--1392904921%22%3EVisual%20Studio%202015%20%E3%81%A7%E3%81%AE%E8%A6%96%E8%A6%9A%E5%8C%96%3C%2FH3%3E%3CP%3E%E3%82%88%E3%82%8A%E9%81%A9%E5%88%87%E3%81%AB%E5%88%B6%E5%BE%A1%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%81%AB%E3%80%81Visual%20Studio%202015%E3%81%A7%E3%82%A2%E3%83%97%E3%83%AA%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%82%92%E4%BD%9C%E6%88%90%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%E6%96%B0%E3%81%97%E3%81%84%E3%83%97%E3%83%AD%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%81%8B%E3%82%89%E5%A7%8B%E3%82%81%E3%81%A6%E3%80%81%E6%AC%A1%E3%81%AE%E3%82%88%E3%81%86%E3%81%AB%E6%96%B0%E3%81%97%E3%81%84%E3%83%95%E3%82%A9%E3%83%BC%E3%83%A0%E3%82%92%E4%BD%9C%E6%88%90%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22149453_149453.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22149453_149453.png%22%20style%3D%22width%3A%20593px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F118353i27D990ACF1E58EAC%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22149453_149453.png%22%20alt%3D%22149453_149453.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22LED%20CONTROLLER.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22LED%20CONTROLLER.png%22%20style%3D%22width%3A%20593px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F57738i28FD2D8884441027%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22LED%20CONTROLLER.png%22%20alt%3D%22LED%20CONTROLLER.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E3%81%9D%E3%81%97%E3%81%A6%E3%80%81%E3%81%99%E3%81%B9%E3%81%A6%E3%81%AE%E3%82%A2%E3%82%A4%E3%83%86%E3%83%A0%E3%81%AE%E6%A9%9F%E8%83%BD%E3%82%92%E8%A8%AD%E5%AE%9A%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%E3%82%AF%E3%83%A9%E3%82%A4%E3%82%A2%E3%83%B3%E3%83%88%E3%81%AF%E3%83%9D%E3%83%BC%E3%83%887%E3%81%AEIP%E3%82%A2%E3%83%89%E3%83%AC%E3%82%B9%E3%81%AB%E6%8E%A5%E7%B6%9A%E3%81%97%E3%80%81%E9%81%B8%E6%8A%9E%E3%81%97%E3%81%9F%E8%89%B2%E3%81%AB%E5%BE%93%E3%81%A3%E3%81%A6%E3%83%91%E3%82%B1%E3%83%83%E3%83%88%E3%82%92%E9%80%81%E4%BF%A1%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%E8%B5%A4%E8%89%B2%E3%81%AE%E5%A0%B4%E5%90%88%E3%81%AF%7B%200xFF%2C%200x00%2C%201%2C%200%2C%200%20%7D%3B%E3%80%81%E9%BB%84%E8%89%B2%E3%81%AE%E5%A0%B4%E5%90%88%E3%81%AF%7B%200xFF%2C%200x00%2C%201%2C%201%2C%200%20%7D%3B%E7%AD%89%E3%80%82%3C%2FP%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3EForm1.cs%3C%2FEM%3E%3C%2FP%3E%3CPRE%20class%3D%22java%22%20name%3D%22code%22%3Epublic%20partial%20class%20Form1%20%3A%20%E5%BD%A2%E5%BC%8F%20%7B%20Socket%20s%20%3D%20new%20Socket(AddressFamily.InterNetwork%2C%20SocketType.Stream%2C%20ProtocolType.Tcp)%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20public%20Form1()%20%7B%20InitializeComponent()%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20private%20void%20button1_Click(object%20sender%2C%20EventArgs%20e)%20%7B%20try%20%7B%20s.Connect(IPAddress.Parse(textBox1.Text)%2C%207)%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20byte%5B%5D%20%E3%83%87%E3%83%BC%E3%82%BF%20%3D%20%7B%200xFF%2C%200x00%2C%200%2C%200%2C%200%20%7D%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20groupBox1.Enabled%20%3D%20true%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%E3%83%9C%E3%82%BF%E3%83%B31%E3%80%82%E6%9C%89%E5%8A%B9%20%3D%20false%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20s.Send(%E3%83%87%E3%83%BC%E3%82%BF)%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20textBox1%20%E3%81%A7%E3%81%99%E3%80%82%E6%9C%89%E5%8A%B9%20%3D%20false%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20%E3%82%AD%E3%83%A3%E3%83%83%E3%83%81%20%7B%20MessageBox.Show(%22%E6%8E%A5%E7%B6%9A%E3%81%AB%E5%A4%B1%E6%95%97%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F%22)%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20%7D%20private%20void%20button_red_Click(object%20sender%2C%20EventArgs%20e)%20%7B%20if%20(s.Connected)%20%7B%20byte%5B%5D%20data%20%3D%20%7B%200xFF%2C%200x00%2C%201%2C%200%2C%200%20%7D%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20s.Send(%E3%83%87%E3%83%BC%E3%82%BF)%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20%7D%20private%20void%20button_green_Click(object%20sender%2C%20EventArgs%20e)%20%7B%20if%20(s.Connected)%20%7B%20byte%5B%5D%20data%20%3D%20%7B%200xFF%2C%200x00%2C%200%2C%201%2C%200%20%7D%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20s.Send(%E3%83%87%E3%83%BC%E3%82%BF)%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20%7D%20private%20void%20button_blue_Click(object%20sender%2C%20EventArgs%20e)%20%7B%20if%20(s.Connected)%20%7B%20byte%5B%5D%20data%20%3D%20%7B%200xFF%2C%200x00%2C%200%2C%200%2C%201%20%7D%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20s.Send(%E3%83%87%E3%83%BC%E3%82%BF)%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20%7D%20private%20void%20button_black_Click(object%20sender%2C%20EventArgs%20e)%20%7B%20if%20(s.Connected)%20%7B%20byte%5B%5D%20data%20%3D%20%7B%200xFF%2C%200x00%2C%200%2C%200%2C%200%20%7D%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20s.Send(%E3%83%87%E3%83%BC%E3%82%BF)%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20%7D%20private%20void%20button_white_Click(object%20sender%2C%20EventArgs%20e)%20%7B%20if%20(s.Connected)%20%7B%20byte%5B%5D%20data%20%3D%20%7B%200xFF%2C%200x00%2C%201%2C%201%2C%201%20%7D%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20s.Send(%E3%83%87%E3%83%BC%E3%82%BF)%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20%7D%20private%20void%20button_cyan_Click(object%20sender%2C%20EventArgs%20e)%20%7B%20if%20(s.Connected)%20%7B%20byte%5B%5D%20data%20%3D%20%7B%200xFF%2C%200x00%2C%200%2C%201%2C%201%20%7D%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20s.Send(%E3%83%87%E3%83%BC%E3%82%BF)%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20%7D%20private%20void%20button_magenta_Click(object%20sender%2C%20EventArgs%20e)%20%7B%20if%20(s.Connected)%20%7B%20byte%5B%5D%20data%20%3D%20%7B%200xFF%2C%200x00%2C%201%2C%200%2C%201%20%7D%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20s.Send(%E3%83%87%E3%83%BC%E3%82%BF)%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20%7D%20private%20void%20button_yellow_Click(object%20sender%2C%20EventArgs%20e)%20%7B%20if%20(s.Connected)%20%7B%20byte%5B%5D%20data%20%3D%20%7B%200xFF%2C%200x00%2C%201%2C%201%2C%200%20%7D%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20s.Send(%E3%83%87%E3%83%BC%E3%82%BF)%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FPRE%3E%3CDIV%20style%3D%22display%3Anone%3B%22%3E%20%3C%2FDIV%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CDIV%20class%3D%22jive-video-view%20jive-content-video%22%20data-browse-id%3D%22537809%22%20data-object-id%3D%22331250%22%20data-object-type%3D%22102%22%20data-video-id%3D%225103%22%20style%3D%22width%3A%20520px%3B%22%3E%3CA%20_jive_internal%3D%22true%22%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fvideos%2F5103%2Fimage%3FsourceObjectType%3D102%26amp%3BsourceObjectID%3D331250%22%20target%3D%22_blank%22%3E%3CIMG%20height%3D%22328%22%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fvideos%2F5103%2Fimage%3FsourceObjectType%3D102%26amp%3BsourceObjectID%3D331250%22%20width%3D%22520%22%20%2F%3E%3C%2FA%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%20%3CP%3E%3C%2FP%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E3%81%8A%E6%A5%BD%E3%81%97%E3%81%BF%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84%EF%BC%81%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIva%3C%2FP%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1122608%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3E%E5%85%A8%E8%88%AC%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
評価なし
バージョン履歴
最終更新日:
‎09-10-2020 02:55 AM
更新者: