JavaScript Arduino Electronics, Complete Introduction— Part 1: Getting Started


In recent years, JavaScript has evolved past merely being a tool for DOM manipulation and begun to expand its influence beyond the realms of the browser window.

Arduino connected via the USB port (

Restrictions of the browser

If we compare it to desktop and mobile applications, JavaScript running in the browser is quite limited. Access to communication ports, hardware components, and the file system are all restricted. This level of security is necessary on the Internet as not every website visited can be trusted, therefore, you need to ensure your computer can’t be infiltrated by malicious code. However, we somehow need to gain access to the USB port to be able to control electronic circuits on the Arduino UNO.

JavaScript and Arduino RC car (

JavaScript outside the browser

Node.js is built on top of Google’s V8 JavaScript engine which can run independently from the browser.

Drone controlled with JavaScript (

Development boards

The development board revolution started around 2005 when the first Arduino was released. The Arduino project was started by a few Italian university teachers trying to make it easy for their students to work with electronic components and program microcontroller chips. Arduino is still by far the most popular platform today.

Arduino UNO development board
The microcontroller chip powering the Arduino UNO

Part 2

In part 2, we will learn how to build a circuit with an LED light and the Arduino UNO and switch it on and off from JavaScript inside the Node.js environment!



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Mate Marschalko

Mate Marschalko

Senior Front-end Web Developer, Creative Technologist with over 12 years experience. Loves pushing the limits of HTML and CSS.