-
I must apologise too - for some reason I've had a mental block re this. It is very simple now you've pointed me at digitalWrite and the high/lo capability of that - and I feel a bit foolish. Re the reference to 4 or 6 pins in groups of 2 or 3 - you're suggesting using those to give me enough current for the motor, effectively parallel connections?
-
Thanks again @allObjects
-
Sorry to hear.
One other thought, if you turn off the Wifi does this help? That's also an obvious difference to the Pico - the wifi module for Espruino Wifi includes a
turnOff
method. I'm wondering about power consumption of the ESP8266 basically.I also have both the Wifi and the Pico, so maybe I try this too.
-
Thanks @allObjects, yes the current is a concern, given that the ESP8266 needs a capacitor for reliable wifi that had crossed my mind also.
Re the pins set up, conceptually that sounds like exactly what I inferred/guessed/hoped might be possible, i imagine I would need to be switching pinMode in my code?
-
-
Plan?
In all honesty there's not much of one. I was pretty certain one of the coils on the solenoid was damaged, so needed an alternative. I thought this servo might just fit.
Really what I envisioned when I started was 3.7v battery powering an ESP8266 which listens for MQTT control messages. The motor and the servo powered from the ESP8266. If I could use analogWrite for motor then I'd have speed control, but that wasn't essential, though it seems I'll have get into analog anyway now the servo is included and I've no idea if ESP8266 is up to this - voices at back of head keep saying timing and WDT and capacitor.
I have an Espruino Wifi I could use but that's not a throwaway strap it to a broken RC car, item.
My question re Espruino being the switch was basically can I create the circuit that flips the polarity to the motor without the h bridge since a double pole switch can do it, can I not setpins via Espruino to emulate what the switch adds to that circuit.
I'm probably being very naive - I don't get enough time to play with this stuff, and I've very little knowledge about electronics beyond household.
-
-
Thanks guys. I actually found the transmitter and receiver board on ebay and ordered a pair.
After reading some of the above material, I thought it might be simpler to cheat and control the RC transmitter itself from Espruino leaving the car to handle the signals.
Though tonight I wonder if the non working solenoid is damaged as I can't wire that to the good connections of the one that works, I would have thought that would work?
Anyway, I'll come back to this thread when the fresh circuit board arrives.
-
-
Hi @allObjects, definitely digital - it's all or nothing on the steering side that works. Here is a pic.
The two wires not connected to the orange wires were originally connected to where my finger points. If I wire them to the board, and put 3.3v from Espruino across each of two points one of the solenoids works - the other does not. I can reverse the voltage on the same connections and get a push effect, but i don't think this is how it was designed to work otherwise the other connection would be redundant. If I just apply voltage to the wires, when they are not attached to the board, then neither solenoid works - so the board is providing something in addition that I do not understand.
-
I've a broken RC car I'm trying to make driveable over the web using MQTT messages (for my kids). I'm nearly there, but the cars steering looks like it is two solenoids. The board that provided this does not work properly, so it only steers one way. Can anyone help me build something that will operate the solenoids.
The car was a 3v (2 * AAA) and I've replaced this with a 3.7v 500mA lipo battery. Eventually I'd like a throwaway ESP8226-12 to be the brains of it. I have a working testbed that listens for MQTT messages and sets LEDS using a combination of digitalWrite and analogWrite. It's just the solenoids I can't figure. It is not enough to just put 3.3v through them, the board must have provided something in addition to this? I can't find much of help on the internet
-
-
On the ESP8226, personally, I don't, I just access the returned object property. But I appreciate this can't be the case with Espriuno + ESP8266. I think a common Wifi API (however the methods must be implemented to make things work), is a good idea though. Save on the confusion and allow script portability where possible. Even when using ESP8266 I've found also running code on the core boards extremely useful to check if an issue is me or a limitation of Espruino on ESP8266.
-
-
Thanks @ClearMemory041063, I can see now, the callback has some additional params. I should have picked that up from the module it is in the comments.
This will also apply to
wifi.scan()
looking at it. -
-
-
Thanks Gordon.
wifi.getIP()
=undefined
Uncaught Error: Function "a" not found!
at line 1 col 165
...ce(15,-1);else if("OK"==d){a(null,b);return}return h}^
in function "b" called from line 1 col 25
d=void 0;var f;b&&(f=b(a))?(d=p,b=f):clearTimeout(e);void 0=...^
in function "d" called from line 1 col 324
...c&&(ec,n=!0);n||d&&d(k)}a=a.substr(f+1);"\n"==a[0]&&(a=...^
in function called from system
Uncaught Error: Function "a" not found!
at line 1 col 15
if(void 0===d)a("Timeout");else{if("+CIFSR:STAIP"==d.substr(...^
in function "b" called from line 1 col 15
d=void 0;b&&b()^
in function called from system
wifi``` suggests maybe callback is required:
wifi ={ "connect": function (a,b,c) { ... }, "disconnect": function () { ... }, "getIP": function (a) { ... }, ....
But this returns null:
wifi.getIP(function(d){console.log(d);}) =undefined null
-
-
-
-
Double checked my keys, add them back and I get the same error. As before. I followed the instructions here to generate, and sign.
https://engineering.circle.com/https-authorized-certs-with-node-js-315e548354a2#.5kba2pm9j
I'm on Mac OSX El Capitan. Is there something else I need to be doing?
-
Hi, typically you'd have a ground, power and a data pin on a module like that. It's the data pin you will send on. I'd guess pin 2 in your pic - making the unnumbered pin, power. For espruino it would be 3.3v power, arduino is 5v. Maybe confirm it is good at 3.3v, I would imagine it is but do not know.