Communication with WIFI-module by USB-Terminal

This example shows how to communicate directly to the WIFI module by using the Serial Monitor.

byte byte1Read;
byte byte2Read;

void setup() {
SerialUSB.begin(115200);  //Serial connection to Serial Monitor
Serial.begin(115200);  //Serial connection to WIFI module
delay(5000);  //This delays the start of the module so all information can be captured in the Serial monitor
digitalWrite(WIFI_EN_PIN, HIGH); // Turns WIFI module on

void loop() {

    if (SerialUSB.available()) {
        Serial.write(; //Reads data from Serialmonitor and sends it to WIFI module
    if (Serial.available()) {
        SerialUSB.write(;   //Reads WIFI module data from  and sends it to Serialmonitor