8 ms·
Cylon: JavaScript framework for robotics, drones, and the Internet of Things
- madcoderme 2y agoLast commit was 8 years ago. I don't think anyone gonna use it now.
- lta 2y ago[flagged]
- wiseowise 2y agoAnd?
- joemaller1 2y agoas an occasional tinkerer who's very fluent in JS, getting to play around in a known language is a bonus. Side projects that require learning or re-learning languages usually go nowhere because the language itself becomes the side project.
- irrational 2y agoWhat are the pros and cons of this compared to Johnny-Five? http://johnny-five.io/ http://johnny-five.io/
- hersko 2y agoI don't think this is being maintained.
- demondemidi 2y agoSeems kind of pointless. A flight controller that can run JavaScript fast enough would be a waste of resources.
- lelanthran 2y ago> Seems kind of pointless. A flight controller that can run JavaScript fast enough would be a waste of resources. According to the docs (for both this and the Johnny-Five project), the JS ONLY runs on a PC-class computer. You connect your IoT device to the computer that is running the JS program, and the JS program then controls the device. The IoT device must be tethered to a PC of some sort. I'm guessing that controlling PC does things like "set GPIO-$X to input", "read GPIO-$X, "set GPIO-$Y to output", "write GPIO-$Y", "read ADC-$A", etc. Maybe they designed their custom protocol to also handle time-constraints (like clocking a signal at a certain frequency on a particular pin), or maybe counting transitions on a digital input for specific duration, so that you can mostly do what you'd expect to, but I wouldn't bet on it. My understanding of these types of projects is that they don't compile the input into a state-machine that is downloaded to the device; they send each instruction as and when it occurs. This is especially problematic considering that the example in linked page is for a drone taking off, flying, then landing 10s later. You better hope that your drone doesn't ascend so fast in that 10s that it is out of range by the time the `land` command is issued.
- deleted 2y ago[deleted]
- _akhe 2y agoJavaScript is a hell of a lot faster than Ruby, PHP, or Python, yet Python is mostly used for AI/ML. I think V8 is plenty "fast enough" (why wouldn't it be)?
- wiseowise 2y agoI think their problem is not performance of JS, but efficiency. V8 is relatively resource heavy and if your microcontroller can run it - it is too powerful for what it is.
- Xeamek 2y ago[flagged]
- portaouflop 2y agoIMO if you work on IoT, you are in the wrong place. But who am I to judge.
- adityamwagh 2y agoExactly my thoughts.
- deleted 2y ago[deleted]
- omegabravo 2y agoIf you're pushing bits and bytes you might want tight control over the runtime and guaranteed execution time. If you're not, I think it's perfectly acceptable.
- Xeamek 2y agoThe same way its 'perfectly acceptable' to use a Canon to kill a mosquito.
- nativeit 2y agoAlso, in many circles, known as “a larf”. In the immortal words of Kurt Vonnegut, “We’re here on this Earth to fart around—don’t let anybody tell you any different.”
- wiseowise 2y agoAnd what's the problem with that?
- dragonwriter 2y agoWell, it's a particularly inefficient use of a delicate camera for a purpose for which simpler, more resilient, more purpose-appripriate tools exist.
- cess11 2y agoI'd reach for Nerves. https://nerves-project.org/ https://nerves-project.org/
- lelanthran 2y ago> I'd reach for Nerves. Not applicable to the clear majority of IoT hardware; it's for embedded systems which are large enough to run Linux, basically. From the website: > Firmware sizes start in the 20-30 MB range.
- cess11 2y agoFine, there I'll reach for AtomVM. https://github.com/atomvm/AtomVM https://github.com/atomvm/AtomVM
- imdsm 2y agoLast commit: 8 years ago.
- charles_f 2y agoAuthor appropriately named deadprogram
- lelanthran 2y agoI write embedded stuff for many of the popular IoT chips/modules/devkits/boards. So, yes, there's a lot of high-level GC'ed languages that "run" on these systems. For hobbyist one-off projects (where you can overspec the hardware by 10x without any negative financial impact to the project) they are great. For mass-production of a device, the extra RAM (and resources in general) that they require tend to be double what you would ordinarily need if written in C (or a crippled dialect of C++).[1] For the best high-level logic control of embedded devices, you cannot beat esphome, and that's because that project converts the high-level logic (specified in YAML) to native C and/or C++ code, which is then pushed OTA to the device. That approach keeps the firmware as lean as possible. [1] My best experience with stuffing a more abstract language into something like an atmega328 (I believe that's what's used for Arduino) is with a special purpose-built compiler that compiled a PLC type language of my own design (only for controlling and switching digital IO and reading ADC) to a byte code, which was run by a tiny interpreter on the atmega, using three bytes per instruction+operand. Such a scheme allowed tons of conditional logic to be stuffed into the flash area, as the 'interpreter' on the chip would read and execute 3 bytes at a time from flash. The native-code version of the same conditional logic could easily be 10x the size.
- oneplane 2y agoIn interested in learning why say, a device would be much more expensive if we use 1GiB of DRAM chips instead of 32MB. The chips themselves have the same physical footprint, power requirements, and as long as you pick one that is compatible with your µC or SoC you don't need to change that either. That leaves the cost of the chip, where you might need to spend a few cents more. I'm pretty sure the consumer doesn't care if the widget costs $21.55 or $21.59. The same would apply to NAND flash storage. I do get that if you have to produce millions of widgets that a few cents here and there might add up, but if you just exchange one part for a physically similar but higher capacity part, and the list price difference is really small, why would that be such a hurdle? I'm not talking about redesigning all the power supplies, adding a PMIC or building an entire computer, but even in the WRT54G days you could just solder replacement DRAM and NOR chips and be done for a few cents for a 500% increase in capacity. In later models you could still do that but the NOR became NAND and BGAs are harder, but it's still pretty easy and cost-effective. In the EE world, designing for manufacture does try to squeeze every fraction of a cent out of everything, while in the software world using 10MB of RAM instead of 1MB is fine as long as you decode your PNGs correctly (via an earlier libpng reference implementation comment a few days ago). Even at volume, I doubt that saving a tenth of a cent really matters until you hit some extreme production numbers. (even 10 million units would at best save you $10k) Mechanically there would be something to consider, i.e. connectors vs screws vs solder vs glue etc, those all have a direct impact on how reliable a connection is, how long it will last, and how easy it is to manufacture (and how easy it is to take apart later). But fractions of a cent when compared to all the other aspects?
- cydodon 2y ago...somewhat off topic... I seem to remember a JavaScript based system that could be installed on (old) mobile phones. This way one had easy access to all the phones sensors, wifi and could build simple GUIs to repurpose the phone. Does anyone know how it is called or where I can find something similar? Thanks =)
- throwaway01uau2 2y agoUrgh
- teeray 2y agoI can’t speak directly for deadprogram and the status of his projects, but I know much of his activity of late has been working in this same space, but in Go: * Gobot (https://gobot.io/ https://gobot.io/) * TinyGo (https://tinygo.org/ https://tinygo.org/) * GoCV (https://gocv.io/ https://gocv.io/)
- hpen 2y agoHas anyone actually built embedded devices with JS? Sounds terrible