I have also tried just M5.begin(); same result as M5.begin(true, true, true, false, kmBusModeInput); where LCD briefly "flashes" (which appears like its trying initialize), internal Green Led flashes and both LCD and Green Led then go off, only difference is the speaker has a low volume "sequel" that is produced with just M5.begin(); the entire time there after, with the other M5.begin(.....) command the speaker is quiet.
I can only get functionality from the Core2 if USB is plugged in.
What should my setup look like?
Here is my code so far... I don't know how to indicate code in a post, so sorry if this is not the correct way to do this.
#include <M5Core2.h>
#include <SPI.h>
#include <M5_Ethernet.h>
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
char server[] = "www.google.com"; // name address for Google (using DNS)
IPAddress ip(192, 168, 0, 177);
IPAddress myDns(192, 168, 0, 1);
EthernetClient client;
void setup {
M5.begin(true, true, true, false, kmBusModeInput);
Ethernet.init(GPIO_NUM_26);
M5.Lcd.setTextSize(2);
M5.Lcd.setTextColor(TFT_WHITE, TFT_BLACK);
M5.Lcd.println("Ethernet Test!");
M5.Lcd.println("Initialize Ethernet with DHCP:");
if (Ethernet.begin(mac) == 0) {
M5.Lcd.println("Failed to configure Ethernet using DHCP");
// Check for Ethernet hardware present
if (Ethernet.hardwareStatus() == EthernetNoHardware) {
M5.Lcd.println("Ethernet shield was not found. Sorry, can't run without hardware. :(");
while (true) {
delay(1); // do nothing, no point running without Ethernet hardware
}
}
if (Ethernet.linkStatus() == LinkOFF) {
M5.Lcd.println("Ethernet cable is not connected.");
}
// try to congifure using IP address instead of DHCP:
Ethernet.begin(mac, ip, myDns);
} else {
M5.Lcd.print(" DHCP assigned IP ");
}
// give the Ethernet shield a second to initialize:
delay(1000);
M5.Lcd.print("Connecting to ");
M5.Lcd.print(server);
M5.Lcd.println("...");
// if you get a connection, report back via serial:
if (client.connect(server, 80)) {
M5.Lcd.print("Connected");
} else {
// if you didn't get a connection to the server:
M5.Lcd.println("Connection failed");
}
}
void loop() {
}
Is the sequence of commands critical?
Is there a command to force the Axp to use MBus seeing that kmBusMode* is no longer used