Ks0243 keyestudio EASY plug W5100 Ethernet Module: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
==EASY plug W5100Ethernet Module==
[[image:ks0245图.jpg|thumb|600px|right|EASY plug Joystick Module ]]
<br>[[File:KS0243-1.png|500px|frameless|thumb]]<br>
 


==Introduction==
==Introduction==
The EASY plug W5100 ethernet module needs to be used with the EASY plug Control board V2.0 control board. The module is connected to the SPI communication interface with only one line, so the wiring is done in a simple and convenient way. W5100 is a multi-purpose single internet interface chip, integrated 10/100 ethernet controller inside,and applied to embedded system which is high integration, high stability, high performance and low cost. It can be connected to Internet without operating system and compatible with IEEE802.3 10BASE-T and 802.3u 100BASE-TX. It contains TCP/IP protocol stack that is full-hardware and verified by market for years, ethernet medium transport layer and physical layer. You don’t need to consider the control of ethernet, and just need simple program of ports.<br>
W5100 is a multi-purpose single internet interface chip, integrated 10/100 Ethernet controller inside, and applied to embedded system which is high integration, high stability, high performance and low cost. <br>
<br>[[File:KS0243.jpg|500px|frameless|thumb]]<br>
It can be connected to Internet without operating system and compatible with IEEE802.3 10BASE-T and 802.3u 100BASE-TX. <br>
It contains TCP/IP protocol stack that is full-hardware and verified by market for years, Ethernet medium transport layer and physical layer.  
You don’t need to consider the Ethernet control, and just need simple program for ports.<br>
The module should be connected to the SPI communication interface on EASY plug control board with only one cable, so the wiring is rather simple.  


==Specification==
<br>
==Specifications==
* Various interface: Direct Bus, Indirect Bus and SPI Bus
* Various interface: Direct Bus, Indirect Bus and SPI Bus
* Supporting TCP/IP protocol stack of hardware, also TCP,UDP,ICMP,IGMP,IPv4,ARP and PPPoE  
* Supporting TCP/IP protocol stack of hardware, also TCP, UDP, ICMP, IGMP, IPv4, ARP and PPPoE  
* Up to 4 independent ports
* Up to 4 independent ports
* Integrating 16KBYTE transmit-receive cache
* Integrating 16KBYTE transmit-receive cache
* Supporting automatic conversion of polarity
* Supporting automatic conversion of polarity
* Coming with Internet access, dual row of 2*14 2.0mm pins
* Coming with Internet access
<br>


==Technical Details==
* Dimensions: 61mm*30mm*18mm
* Weight: 14.1g
<br>


==Connection Diagram ==
==Connect It Up==
<br>[[File:KS0243-2.png|500px|frameless|thumb]]<br>
Connect the EASY Plug Joystick module to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
<br>[[File:KS0245.jpg|500px|frameless|thumb]]<br>


==Sample Code==
<br>
 
==Upload the Code==
Copy and paste below code to [http://wiki.keyestudio.com/index.php/How_to_Download_Arduino_IDE Arduino IDE] and upload. 
<pre>
<pre>
#include <SPI.h>
int JoyStick_X = 6; //x
#include <Ethernet.h>
int JoyStick_Y = 7; //y
 
int JoyStick_Z = 2; //key
#include <Wire.h>
  void setup()  
#include <LiquidCrystal_I2C.h>
{
LiquidCrystal_I2C lcd(0x27,20,4);  
   pinMode(JoyStick_Z, INPUT);  
 
   Serial.begin(9600); // 9600 bps
// Enter a MAC address for your controller below.
// Newer Ethernet shields have a MAC address printed on a sticker on the shield
byte mac[] =
  0x00, 0xAA, 0xBB, 0xCC, 0xDE, 0x02 };
 
// Initialize the Ethernet client library
// with the IP address and port of the server
// that you want to connect to (port 80 is default for HTTP):
EthernetClient client;
void setup() {
   Serial.begin(9600);
   lcd.init();
  lcd.backlight();
}
}
 
void loop()  
void loop() {
{
///////////////////////////////////////////////////////////// W5100
  int x,y,z;
delay(1000);
  x=analogRead(JoyStick_X);
lcd.clear();
   y=analogRead(JoyStick_Y);
lcd.setCursor(0,0);
   z=digitalRead(JoyStick_Z);
lcd.print("T ...");  
   Serial.print(x ,DEC);
   if (Ethernet.begin(mac) == 0) 
  Serial.print(",");
  {
  Serial.print(y ,DEC);
    lcd.setCursor(0,1);
  Serial.print(",");
    lcd.print("W5100 Error!");
   Serial.println(z ,DEC);
    Serial.println("W5100 Error!");
   delay(100);
    while(1);
   }
  lcd.setCursor(0,1);
   for (byte thisByte = 0; thisByte < 4; thisByte++) {
  lcd.print(Ethernet.localIP()[thisByte], DEC);
  lcd.print(".");
  Serial.print(Ethernet.localIP()[thisByte], DEC);
  Serial.print(".");
  }
  lcd.setCursor(14,1);
  lcd.print("OK");
   Serial.println("OK");
   //while(1);
}
}
</pre>
</pre>
Download Address of Libraries:<br>
http://7326097.s21d-7.faiusrd.com/0/ABUIABAAGAAgs4zWvQUokJuN5wU?f=KS0148+Libraries.zip&v=1471514163


==Test Result==
<br>
After connecting the power and burning code, please open the serial monitor, and set 9600 baud rate, you can see the IP address of the network line connected to the EASY plug W5100 ethernet module, as the diagram shown below.
==What You Should See==
<br>[[File:KS0243-3.png|500px|frameless|thumb]]<br>
Done uploading the code, open the serial monitor and set the baud rate to 9600. If push the Joystick button towards different direction, you should get the different value.
<br>[[File:KS0245-3.png|700px|frameless|thumb]]<br>
 
<br>


==Resources ==
==Resources ==
'''Download the PDF:'''<br>
https://drive.google.com/open?id=1eN8fs6Ew9sOMBcJxqhNgWk3qrMnSba9S
'''Download the Code:'''<br>
https://drive.google.com/open?id=1QTwt5lOX7qMmIkL-I0b9ANV1N-6RLYl6


'''File:''' <br>
<br>
https://drive.google.com/open?id=1p7rEYMu5YAaGPQpOddhlyCLMpdV5mDPl


==Buy from ==
==Buy from ==
'''Official Website'''
*'''Official Website:''' http://www.keyestudio.com/ks0245.html


http://www.keyestudio.com/easy-plug-w5100ethernet-module.html
*[https://www.aliexpress.com/store/product/Keyestudio-EASY-plug-Joystick-Module-for-Arduino/1452162_32819777041.html?spm=2114.12010612.8148356.14.79054ba7Qzl9Cv  Shop on aliexpress ]


[[Category:EASY Plug]]
[[category:EASY Plug]]

Revision as of 11:27, 28 November 2018

EASY plug Joystick Module

Introduction

W5100 is a multi-purpose single internet interface chip, integrated 10/100 Ethernet controller inside, and applied to embedded system which is high integration, high stability, high performance and low cost.
It can be connected to Internet without operating system and compatible with IEEE802.3 10BASE-T and 802.3u 100BASE-TX.
It contains TCP/IP protocol stack that is full-hardware and verified by market for years, Ethernet medium transport layer and physical layer. You don’t need to consider the Ethernet control, and just need simple program for ports.
The module should be connected to the SPI communication interface on EASY plug control board with only one cable, so the wiring is rather simple.


Specifications

  • Various interface: Direct Bus, Indirect Bus and SPI Bus
  • Supporting TCP/IP protocol stack of hardware, also TCP, UDP, ICMP, IGMP, IPv4, ARP and PPPoE
  • Up to 4 independent ports
  • Integrating 16KBYTE transmit-receive cache
  • Supporting automatic conversion of polarity
  • Coming with Internet access


Technical Details

  • Dimensions: 61mm*30mm*18mm
  • Weight: 14.1g


Connect It Up

Connect the EASY Plug Joystick module to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
thumb


Upload the Code

Copy and paste below code to Arduino IDE and upload.

int JoyStick_X = 6; //x
int JoyStick_Y = 7; //y
int JoyStick_Z = 2; //key
  void setup() 
{
  pinMode(JoyStick_Z, INPUT); 
  Serial.begin(9600); // 9600 bps
}
void loop() 
{
  int x,y,z;
  x=analogRead(JoyStick_X);
  y=analogRead(JoyStick_Y);
  z=digitalRead(JoyStick_Z);
  Serial.print(x ,DEC);
  Serial.print(",");
  Serial.print(y ,DEC);
  Serial.print(",");
  Serial.println(z ,DEC);
  delay(100);
}


What You Should See

Done uploading the code, open the serial monitor and set the baud rate to 9600. If push the Joystick button towards different direction, you should get the different value.
thumb


Resources

Download the PDF:
https://drive.google.com/open?id=1eN8fs6Ew9sOMBcJxqhNgWk3qrMnSba9S

Download the Code:
https://drive.google.com/open?id=1QTwt5lOX7qMmIkL-I0b9ANV1N-6RLYl6



Buy from