Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using MKR1010 MEM shield's 2MB of Flash #68

Open
egjohnson17 opened this issue Mar 28, 2020 · 0 comments
Open

Using MKR1010 MEM shield's 2MB of Flash #68

egjohnson17 opened this issue Mar 28, 2020 · 0 comments

Comments

@egjohnson17
Copy link

Description

I am attempting to use this library with the Arduino MKR101 Wifi chip and the Arduino MKR1010 MEM shield. https://store.arduino.cc/usa/mkr-mem-shield
The shield has 2MB of flash available in addition to a SD slot. I would like to only use the 2MB of flash to increase my program size capacity. Specifically I need a larger flash size in order to do OTA programming.

Below I have copied code that from ArduinoOTA that should work with a microSD card inserted into the MEM Shield. But I would like to only use the 2MB of flash.
https://github.com/jandrassy/ArduinoOTA

Am I able to use this library to use the flash as program memory?
Thanks!

#include <SPI.h>
#include <SD.h>
#include <WiFiNINA.h>
#include <ArduinoOTA.h>
#include <SDU.h>

#include "arduino_secrets.h"
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
/////// Wifi Settings ///////
char ssid[] = SECRET_SSID; // your network SSID (name)
char pass[] = SECRET_PASS; // your network password

int status = WL_IDLE_STATUS;

void setup() {
//Initialize serial:
Serial.begin(9600);

// setup SD card
Serial.print("Initializing SD card...");
if (!SD.begin(SDCARD_SS_PIN)) {
Serial.println("initialization failed!");
// don't continue:
while (true);
}
// attempt to connect to Wifi network:
while ( status != WL_CONNECTED) {
Serial.print("Attempting to connect to SSID: ");
Serial.println(ssid);
// Connect to WPA/WPA2 network. Change this line if using open or WEP network:
status = WiFi.begin(ssid, pass);
}

// start the WiFi OTA library with SD based storage
ArduinoOTA.begin(WiFi.localIP(), "Arduino", "password", SDStorage);

}

void loop() {
// check for WiFi OTA updates
ArduinoOTA.poll();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant