How to flash Arduino through soft serial? #6402
Replies: 1 comment
-
Posted at 2020-07-26 by @allObjects We can help you flashing Espruino - a JavaScript driven IoT platform and related applications onto ESP-8266 and many other HW / mc boards. For Arduino you have to go some place else. Posted at 2020-07-29 by user111618 Sorry, you were misunderstood my meaning. I mean, based on Espruino, store hex data in flash and transmit data to Arduino to flash it. Posted at 2020-07-29 by @allObjects @user111618, you want to use an Espruino (driven) device to
Is that what you want? Posted at 2020-07-30 by user111618 Yes. Cause Espruino(ESP8266) can not generate 38KHz PWM to drive an IR LED, so I have to use Arduino to do this. But for some reason I'd like to change Arduino firmware, like when I put those MCUs into a box. Posted at 2020-07-30 by @MaBecker
can you please send a snippet of the code you use to come up with this finding. Posted at 2020-08-01 by user111618 Yes. I searched on the forum and use these codes:
And it will reboot itself during process. Posted at 2020-08-01 by user111618 And I had searched on the web, they said i2s can generate 38khz PWM signal, but I don't know how to write the code in Espruino, so if you know how to do with this, please teach me about it, thank you very much. Posted at 2020-08-01 by @fanoush what happens if you omit the last line? Posted at 2020-08-01 by @MaBecker digitalPuls() on ESP8266 can only handle as lowes value 1ms because it is not using the hardware timer which can handle lowest 1us. You are welcome to extend it 😉. Edit: It is but not working as it should Posted at 2020-08-01 by DrAzzy Oh ho ho! Finally a thread on here that is really in my wheelhouse! (I joined the electronics hobby with Espruino - the ease of the live console eliminated the barriers that had kept me from the hobby previously. But then I needed the real-time processing of Arduino, and started dabbling in that, then found my niche with ATTinyCore, and have since dove headfirst into low-level AVR stuff. I love programming so close to bare metal that I can feel the silicon under my fingertips... but I just don't have sufficient mental bandwidth to handle the complexity of STM32 at that depth (besides, their datasheets, particularly the separate manual and datasheet structure, are hell to navigate compared to the AVRs.) However, I still program with Arduino IDE, not the Microchip tools (good lord, I wasted three days just trying to get their thing to read the signature of their new part, using their own programming tool, without getting anywhere, before giving up and modifying the opensource firmware of jtag2updi so I could just use AVRdude like a normal person), and I still use Espruino whenever I have to touch a modern network. The internet, with it's world of variable length strings, was just not made for the fixed length character arrays of embedded C (with 512~2k (occasionally as high as 16k) of ram, and no way to clean up ram fragmentation, dynamic allocation on classical Arduino parts should be avoided like the plague). This generally means that when I use Espruino, I usually have an ESP8266 handling the network tied to an Arduino doing the timing-critical stuff.... Which sounds like about what you're doing! Can you clarify what you mean by "Arduino" in this case? What hardware? Which Arduino board package is used to support it (github link or board manager json), if it is supported by a third party board package? Which exact Tools -> board and Tools -> bootloader (if present in that board package) These details matter a great deal, as the programming methods used on Arduino-supported boards differ greatly with the hardware and bootloader on the board. When you say "soft serial", which side do you want to be using the software serial for that upload you mentioned? Also, you are running Espruino on the ESP8266? Posted at 2020-08-01 by DrAzzy Depending on what is on the Arduino side, I may have some specific advice (very specific if it's an AVR - I know exactly what's needed in this case.) Posted at 2020-08-07 by user111618 I got it, thank you. Posted at 2020-08-07 by user111618 Yeah, whatever it will reboot at here. I still using Arduino to drive IR LED by now. Posted at 2020-08-07 by user111618 Man, your reply is too long that I can't understand it cause I not a native English speaker, sorry. Posted at 2020-08-07 by @fanoush strange, after the suggestion I flashed latest espruino to some random esp8266 board here and it did reboot too with that code but when I removed the Posted at 2020-08-07 by user111618 But even it won't reboot, does the IR signal works? I mean 38khz carrier pulse. Posted at 2020-08-07 by @fanoush no idea, probably not until the resolution/precision of digitalPulse is increased below milisecond as MaBe mentioned Posted at 2020-08-07 by user111618 Yeah. Posted at 2020-08-27 by DrAzzy @user111618 sorry for that - hadn't known you were not native english speaker - most of my post above was totally unimportant!... And sorry for not seeing that someone had replied in this thread until now, too... The important part of my message was just the end: Posted at 2020-08-27 by parasquid I was just gonna make something similar as well (to control some airconditioning units via IR and MQTT over wifi) and glad to know about possible issues. I didn't know ESP8266 couldn't handle some of the higher frequency carrier waves. I've got a few ATTiby85's lying around and might want to play with those to control the stuff with strict timing requirements. Having a single "package" composed of the ESP8266 and the ATTiny85, with Espruino as the main firmware would be cool. That might even be a nice project: being able to flash AVR chips by sending over the compiled hex files via Espruino. Just need some documentation on the wiring and the reset pulses etc. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-26 by user111618
I tried to use IR LED on ESP8266 but it didn't support 38k frequency, so I have to use Arduino to drive an IR LED. It will receive data from ESP8266 through soft serial, but for some reason, I want to transmit hex data to Arduino to flash it. Is anybody know how to do this?
I know the AT firmware can set transmit transparency mode to do this, but I want to know how to flash it using Espruino, thank you.
Beta Was this translation helpful? Give feedback.
All reactions