Let's Code Arduino Simulator from Scratch (with JavaScript) 😬

  Рет қаралды 12,327

Wokwi

Wokwi

Күн бұрын

You'll learn how to build a simple Arduino simulator with JavaScript and React, using the open-source AVR8js library. We'll build it from scratch, and see how it runs a simple program that blinks an LED (virtual one, of course).
Code: codesandbox.io...
Elements library: elements.wokwi...
AVR8js source code: github.com/wok...

Пікірлер: 24
@nishantkurade1581
@nishantkurade1581 4 жыл бұрын
Thank you so much for making this video .
@eXpire163
@eXpire163 4 жыл бұрын
How could i live through last 16 years with out that!!! Will start building on it tomorrow
@Wokwi
@Wokwi 4 жыл бұрын
😁
@fernandonavarrete9839
@fernandonavarrete9839 4 жыл бұрын
You are a genius
@rfly-fpv
@rfly-fpv 2 жыл бұрын
Oh man, this is out of this world! Amazing project and website. One question - is it possible to compile C code in the browser as well? I assume that on that endpoint under the hood server uses "normal" C compiler to output hex.
@Wokwi
@Wokwi 2 жыл бұрын
Thank you! C - Yes, there are some projects that ported c compilers to the browser. Google "clang wasm" for information. Arduino code - I did some initial experimentation compiling an Arduino project entirely in the browser. But my initial results were not promising - you had to download nearly 100mb of binaries and libraries, and even then, it took nearly two minutes just to compile "blink". So while it's possible, it's not very practical, at least not without spending a lot of time on optimizing the process.
@oscar-unj
@oscar-unj 4 ай бұрын
Congratulations!
@MrNix2012
@MrNix2012 2 жыл бұрын
Very great video, thx for that. Are you still planning to make the videos to have a deeper look into the avr8js lib that you mentioned at the end? Or are there already available?
@Wokwi
@Wokwi 2 жыл бұрын
Thanks for the feedback! There's another series of videos where we create a simulation library for a different chip, the Raspberry Pi Pico, from scratch. It's a different architecture (ARM), but the principals are similar. You can find it here: kzbin.info/www/bejne/hoCmhpWNnaeLjKM
@ricardojlrufino
@ricardojlrufino 4 жыл бұрын
Wow , Crazy ...
@何长青-z6w
@何长青-z6w Жыл бұрын
The right pin (anode) of an LED is 13, so how is the left pin (cnode) gnd written in the code?
@asifmulla7567
@asifmulla7567 3 жыл бұрын
Very good🤩
@Wokwi
@Wokwi 3 жыл бұрын
Thanks 🤗
@innokart5699
@innokart5699 3 жыл бұрын
Hi really great initiative. I tried above code in node js react with npm install @wokwi/elements However in browser led is not visible. when i do npm start
@Wokwi
@Wokwi 3 жыл бұрын
Thanks Inno! There could be numerous of reasons for that. You can also try to import the elements script directly into your HTML file, see here for an example: stackblitz.com/edit/wokwi-elements-cdn?file=index.html
@shannonlombardo9196
@shannonlombardo9196 3 жыл бұрын
This is great! I was wondering though, instead of , I wanted to use the NeoPixel Matrix 8x8. Im able to call it and display it on the screen, however I wanted to display 2 directly beside each other and 2 directly below those (think like a 16x16 matrix but created with 4 8x8 matrices). How would I do that? Whenever I create 4 different 8x8 matrices, they're all displayed above/below of each other... Any help would be greatly appreciated!
@Wokwi
@Wokwi 3 жыл бұрын
Hi Shannon, happy to hear that :-) You can use CSS grid to position your matrices in a grid. You can hop on our discord server (wokwi.com/discord) to chat about this!
@the555timer
@the555timer Жыл бұрын
2:45 shouldn't it be gnd instead of d13?
@Wokwi
@Wokwi Жыл бұрын
It should! good spot :)
@shashank2509
@shashank2509 4 жыл бұрын
How Can we simulate HTTP call? Does any of the existing Arduino wokwi board has wifi built in, so that it can be used for IOT project?
@Wokwi
@Wokwi 4 жыл бұрын
No, AVR chips do not have built-in WiFi. For more context, see this discussion on GitHub: github.com/wokwi/avr8js/issues/63
@Wokwi
@Wokwi 3 жыл бұрын
Note that nowdays there's also ESP32 simulation with upcoming WiFi support: docs.wokwi.com/guides/esp32
How Fast Does Your Arduino Code Run? ⏱
19:18
Wokwi
Рет қаралды 27 М.
Every Developer Needs a Raspberry Pi
27:27
Sam Meech-Ward
Рет қаралды 1,2 МЛН
БАЙГАЙСТАН | 3 СЕРИЯ | ДУБАЙ |bayGUYS
44:17
bayGUYS
Рет қаралды 1,8 МЛН
If Your Hair is Super Long
00:53
im_siowei
Рет қаралды 30 МЛН
Cute dog Won Squid Game 😱💸 #dog # funny #cartoon
00:33
Wooffey
Рет қаралды 21 МЛН
Programming a multiplayer game from scratch in 7 DAYS
18:28
Hacking a weird TV censoring device
20:59
Ben Eater
Рет қаралды 3,4 МЛН
Simulating Arduino PWM in JavaScript (AVR8js)
28:00
Wokwi
Рет қаралды 1,8 М.
Driving DC Motors with Microcontrollers
1:04:32
DroneBot Workshop
Рет қаралды 744 М.
An introduction to Shader Art Coding
22:40
kishimisu
Рет қаралды 1 МЛН
How GitHub's Database Self-Destructed in 43 Seconds
12:04
Kevin Fang
Рет қаралды 1 МЛН
I Spent 100 Hours Inside The Pyramids!
21:43
MrBeast
Рет қаралды 76 МЛН
I built a FLAP ENGINE (New Rotary Design)
18:58
Integza
Рет қаралды 1,9 МЛН
Much bigger simulation, AIs learn Phalanx
29:13
Pezzza's Work
Рет қаралды 2,9 МЛН
БАЙГАЙСТАН | 3 СЕРИЯ | ДУБАЙ |bayGUYS
44:17
bayGUYS
Рет қаралды 1,8 МЛН