Most recent activity
-
- 6 comments
- 1,912 views
-
-
here's the code btw - very quick and dirty as i was experimenting late at night :)
var temperatura; var spi = new SPI(); spi.setup({mosi:D2, miso:D1, sck:D27}); SPI1.setup({ sck:D31, mosi:D30, order: "lsb", baud: 4000000 }); //SPI1.setup({ miso:D1, sck:D27, baud:60000 }); var sensor=require("MAX31855").connect(spi,D2); var temper= sensor.getTemp(); console.log(temper); console.log(temper.temp); var g = require("MemoryLCD").connect(SPI1, D29/*SCS*/, D28/*EXTCOMIN*/, 144/*width*/, 168/*height*/); function onTimer() { temper= sensor.getTemp(); temperatura= temper.temp.toFixed(1); g.clear(); g.setFontVector(50); // g.drawString("Hello WORLD",30,70); g.drawLine(0,30,g.getWidth(),30); g.drawLine(0,31,g.getWidth(),31); g.drawLine(0,137,g.getWidth(),137); g.drawLine(0,138,g.getWidth(),138); g.drawString(temperatura, 0, 55); g.setFontVector(20); g.drawString("Battery: "+Puck.getBatteryPercentage(), 0, 143); g.flip(); } // Update temperature every 2 seconds setInterval(onTimer,10000); // Update temperature immediately onTimer();
-
Hello everyone,
First off - really excited about Espruino boards and their capabilities given extremely low power consumption.
I came up with a simple idea of getting better control of the grilling temperature by using 2 espruinos: one takes the measurements with MAX31855 + thermocouple and advertises temperature; another one collects the temp and shows the stuff using Sharp memory display; there will be a piezo beeping in case temperature gets too high.
So the setup is quite simple, I did some quick and dirty testing with Puck.js I had already and connected both screen and thermocouple amplifier to it (and thermocouple to amplifier to get temp measurements).
Everything works like a charm as you can see from the pic attached. As a next step I ordered MDBT42Q as a second device, which will work with a screen, and Puck is expected to take measurements.
So here are some qqs that I'd appreciate help with
- The screen shows inverted image currently, what's the way to get black text / white background?
- In advertising mode only (no screen connected) with MAX31855 attached power consumption seemed close to zero = it kept around 100% for a couple days I kept it on. With the screen attached additionally it was draining roughly 0.5-1% per hour, which is not bad, but it can be better I believe. How to do so? Reducing baud rate? Less frequent screen updates? If so, how to manage do it?
- Is there any way to completely switch off the screen with a command, given it is attached to power (I guess no)?
- Is there any way to completely switch off Puck.js with an external switch without removing a battery?
So far the plan I have is to use for the "screen" device
- MDBT42Q
- battery holder
- kill switch
So that let's say after temperature gets low, the device turns off automatically, but I'm still very interested in making both "screen" and "sensor" parts work as long a possible without changing the battery.
Thanks!
- The screen shows inverted image currently, what's the way to get black text / white background?
@Gordon awesome, thanks!