fede85 / yunsketches Goto Github PK
View Code? Open in Web Editor NEWcollection of sketches for the Arduino Yún
collection of sketches for the Arduino Yún
Hi,
In order to use npm to install nodejs paquages, I need more RAM on the Arduino Yun.
So I think it could be interesting to add a SWAP partition in your program.
I begin to work on it, but i'm not an expert in linux.
I add this before the creation of the second partition:
int dataSWAPSize = readSWAPSize();
String SWAPPartition = "(echo n; echo p; echo 3; echo; echo +";
SWAPPartition += dataSWAPSize;
SWAPPartition += "M; echo t; echo 3; echo 82; echo w) | fdisk /dev/sda";
format.runShellCommand(SWAPPartition);
debugProcess(format);
unmount();
And this:
int readSWAPSize() {
int SWAPSize = 0;
while (!SWAPSize)
{
Serial.print(F("Enter the size of the SWAP in MB: "));
while (Serial.available() == 0);
String answer = Serial.readStringUntil('\n');
SWAPSize = answer.toInt();
Serial.println(SWAPSize);
if (!SWAPSize)
Serial.println(F("Invalid input, retry"));
}
return SWAPSize;
}
So I just have to add the command to make this partition a SWAP, but still working on it:
mkswap /dev/sda3
swapon /dev/sda3
vi /etc/fstab3
// vi command to insert a new line
/dev/sda3 swap swap defaults 0 0
Do you have some ideas to add the last part?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.