-
I have just connected a bunch of sensors (e.g. MPU6050, DHT22, BMP085, RFID, CC3000 Wifi) and wanted to see how much information I can display at once in 'realtime'.
I'm also sending the sensordata via MQTT to collect it.
I don't have a specific project in mind, I'm just looking for viable IoT solutions.One idea would be a smart heatbed module for 3D printers which will automatically pre-heat and regulate the heat based on the MES information and the order management.
-
Hi,
I've got the MeArm recently and I'm trying to control the servos.
It comes with those cheap blue servo motors (sg90), which are depicted in the servo tutorial:
http://www.espruino.com/Servo+MotorsI've tried this simple example just to move a part between two positions in 3 seconds each time it moves.
var s = require("servo").connect(C7); //s.move(0); // move to position 0 over 1 second //s.move(1); // move to position 1 over 1 second //s.move(0.5, 3000); // move to position 0.5 over 3 seconds // move to position 0 over 1 second, then move to position 1 s.move(0, 3000, function() { s.move(1, 3000); });
My question now:
Is it normal, that as soon as I execute the first move for a specific servo object (even multiple other ones) it will move instantly/quickly instead over the specified time?
After that first move all moves will be executed accordingly.BR
Daniel -
-
-
-
The strange thing is that the heltec module (the one OP uses) works on my Arduino UNO on 5V and 3,3V. I also thought it was dead but then I tried it on the Arduino. So the voltage from the Bat pin on the Espruino should be more than enough.
The Crius C0-16, which is also being used on the tutorial/module site here works with the Espruino as inteded.
It's really strange.
-
-
-
-
Yes, it's running 1v71.
Sadly this didn't work, it just doesn't continue after ">echo(0);" as soon as the Clock module is added for import. I'm now trying to get it running in standalone by importing the modules from the SD card.I've also tried to remove the ADXL335 accelerometer code and it also worked.
I'll try another accelerometer sensor, looks like the Clock module and the ADXL335 don't like each other for now.
BR
Daniel -
-
Hi everyone
I have used this code to retrieve sensor data:
var foo = require("ADXL335").connect(C3,A0,A1); var wlan = require("CC3000").connect(); wlan.connect( "xx", "xxx", function (s) { if (s=="dhcp") { console.log("My IP is "+wlan.getIP().ip); require("http").createServer(function (req, res) { var d= foo.readG(); var data= {"x":d[0], "y":d[1], "z":d[2]}; res.writeHead(200, {'Content-Type': 'text/plain'}); res.write(JSON.stringify(data)); console.log("x " + d[0] + " y " + d[1] + " z " + d[2]); // res.write("x " + d[0] + " y " + d[1] + " z " + d[2]); res.end(); }).listen(80); } });
This works just fine. Since I also want to have current timestamps for the sensordata logging, I tried to set the clock as described in the reference, which results in this:
var foo = require("ADXL335").connect(C3,A0,A1); var wlan = require("CC3000").connect(); var Clock = require("clock").Clock; wlan.connect( "xx", "xxx", function (s) { if (s=="dhcp") { console.log("My IP is "+wlan.getIP().ip); var clk=new Clock("Jan 07, 2015 12:38:00"); console.log(clk.getDate().toString()); require("http").createServer(function (req, res) { var d= foo.readG(); var data= {"x":d[0], "y":d[1], "z":d[2]}; res.writeHead(200, {'Content-Type': 'text/plain'}); res.write(JSON.stringify(data)); console.log("x " + d[0] + " y " + d[1] + " z " + d[2]); // res.write("x " + d[0] + " y " + d[1] + " z " + d[2]); res.end(); }).listen(80); } });
But this code won't execute. The clock code parts will work on their own, but as soon as I try to initialize the Clock module with the previous sensor/wifi code, it won't work anymore.
Any ideas?
BR
Daniel
Hm well in that case I'll have to move the parts in "0" position manually before connecting the MeArm because one problem which is being caused by this is that for example the servo at the base, which holds the whole unit, starts oscillating back and forth because of the quick movement and the inertia of the arm.