Most recent activity
-
- 54 comments
- 15,895 views
-
-
-
If I use the the custom espruino graphics canvas how will it work when running in a browser?
Also if I draw directly to the dmd controller board canvas how will this work inside the browser? I had a look at what that board supports and i dont think it supports enough to do what I need. (would need a new font for a start!)(and can you draw fonts half off the canvas?)
Using my own (very simple) byte array canvas (it only supports drawText and copyCanvas) and will work in the browser and on a micro controller (I am thinking of using the stmf4? which definitely has enough ram for all my little byte array canvas's)
Another reason is if i do decide to just straight port this and run in c on a micro controller I can pretty much copy and paste all my logic and canvas code I am not relying on a certain os canvas library.
I spoke to embedded adventures and they say I can either bump up the uart or use the i2c (need to write bit of code my self) to send the frame data to the dmd controller board. Which is my preferred method.
Its cool to see the espruino making and parsing the networkrail request though using that wireless board. One step closer :D
-
Hey
Wow that's pretty cool to see it running on the web ide :)
Regards to the json parser I did not actually know there was a native one! I will definitely use it know I know it exists :) (I did come across it in node js and just assumed it was a node js thing did not know it was a standard javascript method hehe)
I have almost got it working with the removed html canvas :) still working on that canvasCopy method (not quite working right lol) Hopefully finish it off tomorrow in work. But it still all runs fast and is looking good and is using pure byte arrays now :D not relying on html canvas which is nice if I ever wanted to port this to another language.
-
Ah yes that is the file I have included in my php :)
Almost converted html canvas to my own custom byte canvas just need to write the copyCanvas function now :)
Spent ages trying to figure out why my chars where being clipped off. eventually found out that javascript bitwise shift right does not wrap??? and just fills with 0's useless! hehe.
My led panels turned up today but one was damaged in the post :( hoping it still works but will see once driver board turns up hehe (embedded adventures says they will replace if not working 100%) which is good.
-
Ah another reason for the php is if you have multiple destination states the php has to make multiple calls to the networkrail api it also has to make a separate request to collect the calling at stations data (forgot about this lol) then packages it all up in one friendly json response.
If it is written to use require (to load the js files) does this still run inside a browser? I will do some research on this and try and implement it :)
I have included the php file in this reply so you can see what it is doing. I guess it is doing quite a lot and saves the js from making multiple requests and just hides/removes all the train api crap from it which it doesn't really care about. It just wants to make one request and get back just the data it needs :) (way I see it hehe)
Its not 100% finished I still need to sort out the station service messages.
-
I have worked with UK fruit machine (slot machines to the Americans :D) reels before and they are driven using stepper Motors like allObjects has mentioned they need a ramp up and down tables or the motor will just jump. But using a geared one shouldn't need this? (Fruit machines drive a 12inch reel drum directly)