-
Just a quick note to say that if anyone else has trouble getting an AM2302 to work with the DHT22 library (getting -1 returned most of the time), try changing the timeout on this.to50ms to a higher number. 150ms works for the module I have and now it returns a correct value almost all the time.
I found through lots of debugging that the signal was getting cut off most of the time at about the 33rd/34th bit, which meant the checksum rarely matched. I would make some changes to the library, but I don't know if this is just my module that isn't working how it should or if it's common for all of them.
-
-
-
-
@tve is the ADC currently accessible? Does it need a considerable amount of work to get it up and running? Thanks!
-
I'd recommend not using the HY board (save it for something complicated) and getting an ESP8266 (on a NodeMCU for simplicity) for this project. They can run Espruino really well, albeit with not as much free memory as a Pico. I have a few running similar LEDs and they're great.
The caveat of the ESP8266 is the small amount of memory so you have to be careful programming for them. If you're worried about that then get a Pico, ESP8266 and a shim from Gordon (or get one anyway and support his awesome work).
Mixing this http://www.espruino.com/WS2811 and this http://www.espruino.com/Interactive+Web+UI you should be able to do what you want fairly nicely.
-
-
Is there currently any way to get a random number from the ESP8266? I currently have a bit of code that needs to generate a random ID on boot, but each time it gets the same ID.
I've tried seeding the software random (which seems to do nothing) and the hardware random number generator (which also gives the same result each time).
Thanks!
-
This is exactly the board I've been waiting for.
I've been making a lot of custom hardware based on Espruino (10's of devices), on official boards and ESP-12/01/NodeMCU's, and the one thing missing from most of them are proper mounting points. Just one screw hole would be enough to make it really easy to mount in an enclosure, two would be even better.
-
Today there is 20% off the Pico and 50% off the full size Espruino (£16.04 and £13.34 respectively).
http://www.seeedstudio.com/depot/s/espruino.html?search_in_description=0
@Gordon, I assume they still pay you the same amount?
-
More results.
I tried using the opendrain mode with a resistor pulling up to 5V but it stopped any visible output. I also tried a logic level converter but that made it less reliable.
It seems the ESP8266 is pretty tolerant to 5V after all.
Completely inexplicably the esp.neopixelWrite() started working for me! I wish I knew why but I can only assume something improved when I was swapping cables around. I think I'm going to use this and leave the hardware SPI to those of you that know more what you're doing, at least for now.
Thanks for all the help :)
Summary for anyone that comes in to this thread later:
Software SPI works, but might take a few attempts to figure out.
Hardware SPI is well on the way and works on and off, but isn't quite there yet. -
@Kolban, I don't have any real NeoPixels here unfortunately. The circuit could well be the problem.
@MarkusGritsch, I've taken out the D15 reference for anyone that looks at it later. The timing is definitely flakey and sometimes it doesn't quite work out, but what I'm doing isn't mission critical so I don't care too much if it sometimes goes wrong. I have no idea why I needed the setTimeout(), but it was a lot more flakey without it.
@Gordon, it seems slightly contentious as to whether the ESP8266 is 5V tolerant, but I've not had any problems using a 5V signal yet. I have some logic level shifters I'll try out too. I can borrow a scope but it's going to be a few days before I have the time to do much with it.
I'll report back what I find and hopefully somewhere in there will be something useful.
-
Unfortunately that hasn't helped. I managed to get SPI1 working occasionally but only by putting a number as padding at the start of the array, but that still only seems to work some of the time.
SPI1.setup({baud:3200000}); var r = 25; var g = 25; var b = 25; SPI1.send4bit([10, r, g, b], 0b0001, 0b0011);
Edit: with more testing it seems almost random what colour comes out compared to the array that gets sent.
Edit 2: The hardware SPI seems to give a different output even if I send the same command several times, it looks like a timing problem to me, but that's a guess from playing around with the baud rate. It looks like software SPI is the only option for me at the moment.
Edit 3: This works, but don't ask me why. The timeout and the leading 0 in the array are essential for it to reliably output the correct colour.
SPI1.setup({baud:3200000}); setTimeout(function(){ SPI1.send4bit([0,10,10,10], 0b0001, 0b0011); },100);
-
Hi,
Is this currently working? I'm trying to drive a single WS2811s (in particular this circuit: https://hackaday.io/project/4603-pixiflood).
I've tried using the hardware SPI implementation on the ESP8266 too but I've had no joy with that either. The LED works fine on my Espruino Pico using hardware SPI so I know that's fine.
My environment is:
NodeMCU
Espruino v81.780
12V circuit running the LED, 3.3V in the NodeMCU, common groundHere's the code I've been using:
var esp = require("ESP8266"); var pin = new Pin(15); // I've tried all available GPIOs esp.neopixelWrite(pin, [50, 50, 50]);
Any help would be really appreciated as I'd like to use this for a demo of some of my research on Wednesday.
Thanks!
-
Thank you for that! I didn't realise I'd have to do that, that'll teach me to not RTM.
Although doing this did lead to a different problem: when the board was plugged in to the mains for power and my laptop via a USB/UART adapter there was a lot of corruption in the data sent over serial. Although, I managed to find the solution to that on my own:
For anyone else that has the same issue, I solved it by connecting the ground pin on the USB/UART to the ground pin on the Espruino board, which hopefully isn't dangerous and makes the ground common between the two devices and removes the interference causing the bad signals.
The corruption was especially bad when the charger was plugged into my laptop.
-
-
Hi,
I'm trying to use the Espruino board with a USB mains charger (a phone one), but it doesn't seem to be powering up. The charger works with my phone, and I've tried 3 different ones (all rated at 2A), but none seem to power it. The board works fine when I plug it into my laptop.
Any ideas?
Thanks!
@fuzzy try flashing it at 115200, I've found that usually works. Also dont have the espruino IDE connected when flashing with esptool.