Folks,
I have tried using the Adafruit airlift module with a teensy 3.2 using the wiring and code suggested here:
https://github.com/j3nsykes/OSC_propShield
I've checked all pin connections, they're solid. I'm using a separate power supply - the airlift is not dependent on the USB mAmperage. I'll post the code below, but notice that I try:
and I get:
I promise I've been a good citizen and read all the posts on the forum about using the airlift and it still aint working.
Any suggestions!?
thanks,
o
I have tried using the Adafruit airlift module with a teensy 3.2 using the wiring and code suggested here:
https://github.com/j3nsykes/OSC_propShield
I've checked all pin connections, they're solid. I'm using a separate power supply - the airlift is not dependent on the USB mAmperage. I'll post the code below, but notice that I try:
Code:
// check for the WiFi module:
while (WiFi.status() == WL_NO_MODULE) {
Serial.println("Communication with WiFi module failed!");
// don't continue
delay(1000);
}
and I get:
MAC: 00:00:00:00:00:00
Communication with WiFi module failed!
I promise I've been a good citizen and read all the posts on the forum about using the airlift and it still aint working.
Any suggestions!?
thanks,
o
Code:
#include <SPI.h>
#include <WiFiNINA.h>
#define SPIWIFI SPI
#define SPIWIFI_SS 10 // Chip select pin
#define SPIWIFI_ACK 7 // a.k.a BUSY or READY pin
#define ESP32_RESETN 5 // Reset pin
#define ESP32_GPIO0 -1 // Not connected
void setup() {
//Initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
Serial.println("WiFi Scanning test");
// Set up the pins!
WiFi.setPins(SPIWIFI_SS, SPIWIFI_ACK, ESP32_RESETN, ESP32_GPIO0, &SPIWIFI);
// print your MAC address:
byte mac[6];
WiFi.macAddress(mac);
Serial.print("MAC: ");
printMacAddress(mac);
// check for the WiFi module:
while (WiFi.status() == WL_NO_MODULE) {
Serial.println("Communication with WiFi module failed!");
// don't continue
delay(1000);
}
String fv = WiFi.firmwareVersion();
Serial.println(fv);
if (fv < "1.0.0") {
Serial.println("Please upgrade the firmware");
while (1) delay(10);
}
Serial.println("Firmware OK");
}
void loop() {
// scan for existing networks:
Serial.println("Scanning available networks...");
listNetworks();
delay(10000);
}
void listNetworks() {
// scan for nearby networks:
Serial.println("** Scan Networks **");
int numSsid = WiFi.scanNetworks();
if (numSsid == -1) {
Serial.println("Couldn't get a wifi connection");
while (true);
}
// print the list of networks seen:
Serial.print("number of available networks:");
Serial.println(numSsid);
// print the network number and name for each network found:
for (int thisNet = 0; thisNet < numSsid; thisNet++) {
Serial.print(thisNet);
Serial.print(") ");
Serial.print(WiFi.SSID(thisNet));
Serial.print("\tSignal: ");
Serial.print(WiFi.RSSI(thisNet));
Serial.print(" dBm");
Serial.print("\tEncryption: ");
printEncryptionType(WiFi.encryptionType(thisNet));
}
}
void printEncryptionType(int thisType) {
// read the encryption type and print out the name:
switch (thisType) {
case ENC_TYPE_WEP:
Serial.println("WEP");
break;
case ENC_TYPE_TKIP:
Serial.println("WPA");
break;
case ENC_TYPE_CCMP:
Serial.println("WPA2");
break;
case ENC_TYPE_NONE:
Serial.println("None");
break;
case ENC_TYPE_AUTO:
Serial.println("Auto");
break;
case ENC_TYPE_UNKNOWN:
default:
Serial.println("Unknown");
break;
}
}
void printMacAddress(byte mac[]) {
for (int i = 5; i >= 0; i--) {
if (mac[i] < 16) {
Serial.print("0");
}
Serial.print(mac[i], HEX);
if (i > 0) {
Serial.print(":");
}
}
Serial.println();
}