-
Three boards of that size from OSHPark (they have a minimum order size of 3) was $28.00. I've not received anything from customs yet so I'm hoping they just got through :)
Another option is ragworm.eu which is in the UK but they are a bit pricer (though probably quicker turn around, OSHPark took about 1 week to print, then 1 week to deliver using their free delivery option).
Matt
-
-
-
@Gordon yea, seems to be working pretty well so far which is cool (though annoyingly I've spotted another un-wired PIN B10, although that's one of the awkward ones in the middle that I doubt people will connect anyway so not a biggy right now)
I've updated my eagle layout though with those two wires now connected, and the terminal block on the other side, so I'm keeping it up to date as I go along.
@Hardware_Hacks I'll keep an eye out :)
-
So I've re-flashed as suggested (thanks for step by step guys) which all went well, and have updated the code to as follows:
var OE = B6; var CLK1 = C6; var CLK2 = C7; var DAT = C8; var LAT = C9; var HIGH = 1; var LOW = 0; pinMode(OE, 'output'); pinMode(CLK1, 'output'); pinMode(CLK2, 'output'); pinMode(DAT, 'output'); pinMode(LAT, 'output'); var counter = 0; var currentRow = 0; var image = new Uint8Array(8); var display = [ [1,1,1,1,1,1,1,1], [1,1,1,1,1,1,1,1], [1,1,0,0,0,0,0,0], [1,1,1,1,1,1,1,1], [1,1,1,1,1,1,1,1], [1,1,0,0,0,0,0,0], [1,1,1,1,1,1,1,1], [1,1,1,1,1,1,1,1] ]; var S1 = new SPI(); S1.setup({mosi:DAT, sck:CLK1, mode:3}); var S2 = new SPI(); S2.setup({mosi:DAT, sck:CLK2, mode:0}); function updateDisplay() { var newImg = new Uint8Array(8); for(var j=0; j<8; j++) { newImg[j] = 0x00; for(var i=0; i<8; i++) { newImg[j] <<= 1; newImg[j] |= display[j][i]; } } if(newImg != image) { for(var i=0; i<8; i++){ image[i] = newImg[i]; } } } function updateRow() { if(counter==8) { counter = 0; currentRow = 0x80; } writeToRegister(0); writeToDriver(image[counter]); writeToRegister(currentRow); currentRow >>= 1; counter++; } function writeToDriver(dataOut) { digitalWrite(OE, HIGH); S1.send(dataOut); digitalWrite(LAT, HIGH); digitalWrite(LAT, LOW); digitalWrite(OE, LOW); } function writeToRegister(dataOut) { S2.send(dataOut, LAT); digitalWrite(LAT, LOW); } updateDisplay(); setInterval(function(){ updateRow(); }, 1000);
(Just put a 1s interval for now to test) but I get an error in the terminal window:
INTERNAL ERROR: Timeout on SPI TX INTERNAL ERROR: Timeout on SPI TX INTERNAL ERROR: Timeout on SPI RX at line 2 col 25 S2.send(dataOut, LAT); ^ in function "writeToRegister" called from line 6 col 22 in function "updateRow" called from line 2 col 13 in function called from system ERROR: Error processing interval - removing it. Execution Interrupted during event processing.
@DrAzzy I'd love to see your write up if you get that working.
-
Thanks Gordon
When you say use SPI if it's connected, do you mean if the device supports it? Or do you mean specific pins? (Sorry if dumb questions) If they are, is it the same process as the code sample above? Or is that just for software based SPI? To use the new Espruino bins I take it I just need to re flash the board? Is it as simple as setting the URL to the binary I want to use in the options window?
Cheers
Matt
-
@DrAzzy just added the version number now :)
-
-
Thought I'd give the Matrix a try by porting over code from the gamer library here, which has been converted to:
var OE = B6; var CLK1 = C6; var CLK2 = C7; var DAT = C8; var LAT = C9; var HIGH = 1; var LOW = 0; pinMode(OE, 'output'); pinMode(CLK1, 'output'); pinMode(CLK2, 'output'); pinMode(DAT, 'output'); pinMode(LAT, 'output'); var counter = 0; var currentRow = 0; var image = new Uint8Array(8); var display = [ [1,1,1,1,1,1,1,1], [1,1,1,1,1,1,1,1], [1,1,0,0,0,0,0,0], [1,1,1,1,1,1,1,1], [1,1,1,1,1,1,1,1], [1,1,0,0,0,0,0,0], [1,1,1,1,1,1,1,1], [1,1,1,1,1,1,1,1] ]; function updateDisplay() { var newImg = new Uint8Array(8); for(var j=0; j<8; j++) { newImg[j] = 0x00; for(var i=0; i<8; i++) { newImg[j] <<= 1; newImg[j] |= display[j][i]; } } if(newImg != image) { for(var i=0; i<8; i++){ image[i] = newImg[i]; } } } function updateRow() { if(counter==8) { counter = 0; currentRow = 0x80; } writeToRegister(0); writeToDriver(image[counter]); writeToRegister(currentRow); currentRow >>= 1; counter++; } function writeToDriver(dataOut) { //console.log("Driver data:" + dataOut); digitalWrite(OE, HIGH); for(var x=0; x<=7; x++) { digitalWrite(CLK1, LOW); digitalWrite(DAT, (dataOut & (1<<x)) >> x); digitalWrite(CLK1, HIGH); } digitalWrite(LAT, HIGH); digitalWrite(LAT, LOW); digitalWrite(OE, LOW); } function writeToRegister(dataOut) { //console.log("Register data:" + dataOut); digitalWrite(LAT, LOW); for(var y=0; y<=7; y++) { digitalWrite(DAT, (dataOut & (1<<y)) >> y); digitalWrite(CLK2, HIGH); digitalWrite(CLK2, LOW); } digitalWrite(LAT, HIGH); digitalWrite(LAT, LOW); } updateDisplay(); setInterval(function(){ updateRow(); }, 1);
And it actually works, to a degree :) Right now, because it's using a bitshifter to update the LED rows one at a time, it seems the Espruino isn't firing quick enough to make it look seemless.
Is there anything that can be done to speed this up? or can anyone suggest any alternative way of updating the display in one burst?
Many thanks
Matt
-
Ok, so today is the day my Arduino adaptors came so I've been testing some of the basic components. So far I can control the LED, I can sound the Buzzer (currently just setting it to high, but will figure out PWMing it later). I've also tested all the buttons which seem to work too (apart from I forgot pin C3 on my arduino shield so had to solder a wire across).
A couple of questions then. If I want to watch all the buttons, do I setup watches on all the pins? or is there a way to watch multiple pins and determine which one was triggered? Also, should I be setting the pinMode myself? or will watching the pins just be enough? if I do set the pinMode, what input mode would I need (I still never quote get when to pullup or pulldown)?
The last "simple" component to test is the light sensor. If I understand this forum post correctly, does this mean I'm not able to watch the pin for changes? rather would need to setInterval and check the value periodically? Probably not a big deal if I do, as power preservation won't be key.
Cheers guys
Matt
-
-
Checkout what just arrived in the post :)
I've already spotted one issue, which is that the terminal block blocks the power (which I wanted) but also prevents you from connecting the USB (doh!). I'll switch it to the other side, but for the time being, might be better connecting some wires than a terminal block.
@Hardware_Hacks do you want to DM me your address (on here or on twitter) and I'll send one out to you.
Matt
-
-
@gordon great stuff, I'll work off master moving forwards then. Glad you are happy with it all.
-
Hi @Frida unfortunately it looks set to be the new design for the Web IDE, so some bits may just have to be gotten used to.
That said, I have just implemented a "compact mode" so all the icons can be shrunk to half the size in order to maximize on space. I hope this is a good enough compromise.
Matt
-
Hey @frida, sorry you aren't a fan. Which bits are you referring to regarding "black in black"? I tried to keep things high contrast with white icons on dark backgrounds to make things easily discoverable, but if you think something isn't right, I'd be interested to know which bits.
Regarding the icons, I think this could be argued either way. In the initial design I found them to be too small and fidley, where as I've tried to make them more prominent / easy to hit and more logically grouped by context.
One idea I just had though that might help if you aren't a fan is to add hot-key commands to allow you to perform actions with the keyboard. Do you think this would help?
I know you aren't going to please all the people all the time, but it would be nice to see if there is a middle ground that could be had.
Matt
-
@gordon no particular reason, other than I switched the splitter for mine so we could toggle the orientation + stop it being dragged of the edge. I'll add it to my list to take a look at.
Matt
PS Should we add these as issue on github so we can keep track of what needs doing?
-
@graf I think the minimum we go down to is around 12pt in some locations (the titlebar / options text), but if there is somewhere in the current IDE you really find small, do let us know and we can try and make sure we make it better in this version.
Gordon has already added the ability to change the font sizes in the code areas though, so hopefully between that and the new design, we shouldn't have anything too small.
Matt
-
-
-
-
More screenshots. Now added a status bar with progress bar (so you can now write to status bar, or use alerts). Have also styled the options panel a little.
I think, this should be pretty much there. @gordon you fancy giving it a test?
Matt
-
Bit of a screenshot update. Still need to tidy up the options dialog, and need an alternative for the Status progress indicator, but otherwise looking good.
I've pushed everything I've done so far to my fork here if you want to take a look.
Matt
-
Hey Gordon,
Made some good progress this evening. Added a custom titlebar, setup all the icon areas (and they work). Added a notifications module (like in my demo). And started to get things looking all-together cleaner.
I've also tweaked the CSS for the modals so that they are positioned via CSS, and therefore don't need re-positioning via JS, and likewise for the splitter.
I'm gonna do some more bits tomorrow, but thought I'd give you a bit of an update.
Matt
Saying that, I see you are in the US, so OSHPark shouldn't be a problem for you.