-
I noticed I can apply 5v to power the MDBT42 w/breakout board, but all of the pins are only 3.3v tolerant. I believe the answer is "no issue" but is there any issue if I use a 5v power supply to power the breakout board and a couple 9g servos. Then use pins D14-D18 as the signal pins for the servos.
Sorry for the dumb question. Normally I just use the wifi board where it's all 5v tolerant so I never gave it a thought before. But now I'm second guessing myself with this board. I just want to make sure that having the pins connected to servos that are being powered by 5V wont cause an issue for the board before I go powering things up.
Thanks for your help!
-
-
Thanks!
I organized the code like that because my original plan was to deploy the different displays over the web using websockets and http requests. But I'm still working through some issues with that approach because it's too easy to break things and a bit harder to debug remotely.
As for the grid, I went with black to limit the light blending between squares. I was trying to get a crisp square "pixel" look, which I think the black achieved pretty well. Having a more transparent grid would probably soften the look, which is also nice especially for more ambient displays.
I'm sure I could create a randomly generated flame effect but for that I would probably need to leverage the graphics library. I went with a simpler (to me) approach of mapping the matrix to an almost paint-by-numbers array. I did this because originally I was going to have my kids come up with some pixel art .... yeah they lost interest before I was able to get it in-place. :) While the array method makes it easier to visualize what will be displayed, it's slower for the microcontroller to render.
I did see some of your posts when I was searching around. Very cool stuff. I like the post where you and Gordon discuss the inline C and Graphics approaches. The C stuff is very cool. To be honest, I need to sit with those a bit more and play around. I get it more when dealing with LCDs but I'm not quite putting 2 and 2 together on how the Graphics library works with a 16x16 neopixel matrix to draw some sort of pixel art without having to code up a ton of drawline function calls. I just need to get familiar with it.
Thanks for checking out the project!
-
Hey all,
My daughter was looking at LED displays on Amazon. Instead of buying one, I decide to build her a 16x16 LED frame. I have a couple example apps / displays written up and am working on another that pulls data in from the web that drives the display.
If anyones interested, I posted a little how-to over on Make:Projects and the code is up on Github.
How-to: https://makeprojects.com/project/lumiius-led-matrix
-
-
Has anyone experienced an issue where your HTTP request is never made? The project I'm working on requests some JSON data on a regular basis (60s) from a server. It works the majority of the time but after it runs for a while, it starts to have issues with orphaned requests. I've run this same code against several different servers, hosts, files, etc... both local and remote and still the same issue.
Below I have a simple test and if you let this code run for a while, it will eventually start to trip up. I have it set to call every 5 seconds for this test but Increasing the time between calls does not help. I've had it 20, 30 & 60 seconds and still the same issue.
Beyond it's just my network, does anyone have any thoughts? Thank you!
let timer = null; let WIFI = require("Wifi"); function makeRequest(){ console.log("GET"); require("http").request({ "host":"http://www.espruino.com", "path":"/", "method":"GET", }, function(res) { res.on('data', function(data) { }); res.on('close', function(data) { console.log("CLOSED", res.statusCode); }); }).end(); } WIFI.connect(SSID, { password : PWD }, function(err) { if (err) { console.log("WIFI ERR",err); return; } console.log("Connected to wifi."); makeRequest(); timer=setInterval(()=>{ makeRequest(); },5000); });
-
-
I'm trying to setup a temporary open access point and no matter what I do, when I upload it to Flash, the console reports an "Uncaught Error: Password must be at least 8 characters"
WIFI.startAP(####, (err)=>{});
and
WIFI.startAP(####, { authMode: 'open' }, (err)=>{});
Board Information
VERSION 2v06
GIT_COMMIT 21168a2b
BOARD ESPRUINOWIFI
MODULES Flash,Storage,heatshrink,fs,net,dgram,tls,http,NetworkJS,WIZnet,tv,crypto,neo ...Has anyone else run into this and have a workaround other than setting a password?
Thanks!
-
I needed the ability to monitor, update and execute code remotely on my Espruino Wifi so I built a little module to help with that. It gives you the ability to do the following from your web browser without being physically near your device.
Features:
- Get & set variables on your Espruino
- Execute functions on your Espruino, passing in parameters and getting return values
- Execute new code or overwriting existing code on your Espruino
- Listen for events on your Espruino
- Setup watchers to monitor variables & functions on your Espruino
- Monitor the connection status of your Espruino
- Rebooting your Espruino
The repo and readme's are at:
https://github.com/protoroboticsgit/espruino/tree/master/devicercDon't worry about having to setup a websocket server either, I have a public one running for fellow Espruino users who want to play around. :)
If you need any of that functionality I hope it helps you out.
- Get & set variables on your Espruino
-
-
I already have a couple Espruino wifi boards but am looking to get a Puck due to it's small form factor to use to track a persons movement. Something like a fitness tracker. Would using the magnetometer in the fashion described above allow you to track things like arm motions0 and get values that could be used like an accelerometers x,y,z values?
-
Here's a little Neopixel effects library that has some basic effects that you can string together to make more complex lighting patterns. I needed to add some lighting effects to my daughters Halloween costume so I created this for myself. I hope someone else finds it useful as well. If you have an idea for other effects, just let me know.
https://github.com/jsrocket/espruino/tree/master/pixelfx
List of the current effects.
- on
- off
- blink
- fade
- pulse
- heartbeat
Example
var pixelfx=require('https://github.com/jsrocket/espruino/blob/master/pixelfx/pixelfx.min.js').init(B15, 16); pixelfx.blink({ 'cnt':2, 'time_on':10, 'time_off':10, 'color':[[50,0,0]], 'blink_fx':'sequence' }, function(r){ pixelfx.blink({ 'cnt':5, 'time_on':100, 'time_off':100, 'color':[[0,50,0],[50,0,0],[0,0,50]], 'blink_fx':'sync' }, function(r){ console.log(r); pixelfx.off(); }); });
- on
-
Hey I just wanted to follow up on my thread here. I created a little servo module that allows me to easily adjust the min and max pulses based on the servo I'm using. This way I get the full 0 - 180 degree sweep. It also has a couple features that I wanted like the ability to actively hold a position as well as the ability to stop the servo mid motion.
https://github.com/jsrocket/espruino/tree/master/servoxt
Hope it helps someone else. :)
-
-
-
-
Huh. Unfortunately I still can't access the site or the links you sent and the Web IDE is still hanging. I tried on several computers here and even restarted my modem and router and still nothing. However when I tried over my cell network (not wifi) the site loads. So sounds like it may be something with the ISP or network on my end. Thanks for the reply allObjects.
-
I was just using the Web IDE earlier today and everything was fine. However now my Web IDE is not properly connecting & sending code to the board and I can no longer reach espruino.com. I was just wondering if anyone else was having a similar issue?
Also I'm sorry if this is the wrong board for this post. I was not sure where to place it and "news" seemed the closest. If it's in the wrong spot I will move or delete it.
Thank you!
-
-
Hey allObjects, you're right. Thanks! Also you were right about the pulse length. I found if I repeatedly called digitalPulse(A0, 1, 0.2) it would rotate fully clockwise and if I did the same with a time set to 3 instead of 0.2 it would rotate the full amount in the other direction.
I'm not sure if that will cause a problem but at least I have a starting point now. Thanks for the tip! :)
-
Right now, I'm powering the Espruino via the USB and have the servo sharing the ground and powered via a separate 5v power supply like the docs recommend.
Below is the code I'm using. It's pretty basic. I was just trying to test out the servo module.
var hat = require('servo').connect(A0); var pos=0,t=null; function sweep(){ hat.move(pos,500,function(){ if(pos===0){pos=1;}else{pos=0;} t=setTimeout(function(){ sweep(); },1000); }); } hat.move(0.5); sweep();
-
Hello, I'm fairly new to working with the Espruino Wifi and I love it, however, I'm working on a project using the servo module and am finding that when I send the servo a command like s.move(0); it does not travel as far as when I call it's equivalent s.write(0); on my Particle Photon board. The same goes for s.move(1); it does not travel the full rotation like it does when I call s.write(180); on the Photon. I tried to also call it directly using digitalPulse and found the same results.
This is causing an issue because I'm losing about 15-20% of the rotation which I need for this project. Is there anyway I could get the servo to go fully to 0 or 180 degrees using the Espruino? Any assistance would be greatly appreciated. Thank you!
Sounds like you need a CORS proxy. If you don't already have a server to play with, I would recommend signing up for a free Cloudflare account and then setting up a worker with the attached code. I took one of their samples and simplified it a bit and I think you get 100,000 requests a day for free.
The attached code is running under a worker I just setup so that you can test to see if it solves your issue. Just remember to URL encode your NOAA API url before you paste it into the url query string param.
EXAMPLE