{"id":4976,"date":"2018-07-30T10:25:16","date_gmt":"2018-07-30T08:25:16","guid":{"rendered":"https:\/\/blog.generationrobots.com\/?p=4976"},"modified":"2023-03-29T14:27:11","modified_gmt":"2023-03-29T12:27:11","slug":"arduino-tutorial-creation-of-a-diy-lamp-lumina","status":"publish","type":"post","link":"https:\/\/www.generationrobots.com\/blog\/en\/arduino-tutorial-creation-of-a-diy-lamp-lumina\/","title":{"rendered":"Arduino tutorial &#8211; Creation of a DIY lamp \u00ab\u00a0LUMINA\u00a0\u00bb"},"content":{"rendered":"\n<html>\n <body>\n  <p>\n   This\n   <strong>\n    Arduino\n   <\/strong>\n   based project tutorial was created by an amateur and is mainly aimed at other amateurs, or anyone with a bit of curiosity for this type of electronic DIY projects.\n  <\/p>\n  \n  \n  <p>\n   The author appeals in advance to the benevolence of the venerable experts whom would like to dig a little in the code or in the mechanical conception (Arduino code and STL files available at the end of this article).\n  <\/p>\n  \n  \n  <p>\n   LUMINA is a\n   <strong>\n    3D-printed\n   <\/strong>\n   lamp, based on RGB LEDs whose color and intensity can be modified. It features\n   <strong>\n    different modes\n   <\/strong>\n   , and can be used as a decorative lamp or as a game. The user interacts with the lamp\u2019s\n   <strong>\n    6 ultrasonic sensors\n   <\/strong>\n   to switch between the different modes or activate the LEDs.\n  <\/p>\n  \n  \n  <h2 class=\"wp-block-heading\" id=\"h-what-hardware-do-you-need\">\n   What hardware do you need?\n  <\/h2>\n  \n  \n  <ul class=\"wp-block-list\">\n   \n   <li>\n    <span style=\"font-weight: 400;\">\n     1 x\n     <a href=\"\/blog\/en\/need-help-choosing-the-right-arduino\/\">\n      Arduino Uno Rev3 main board\n     <\/a>\n     .\n    <\/span>\n   <\/li>\n   \n   \n   <li>\n    <span style=\"font-weight: 400;\">\n     1 x USB Cable B type.\n    <\/span>\n   <\/li>\n   \n   \n   <li>\n    <span style=\"font-weight: 400;\">\n     1 x piezoelectric buzzer (optional).\n    <\/span>\n   <\/li>\n   \n   \n   <li>\n    <span style=\"font-weight: 400;\">\n     1 x 220 ohms resistor.\n    <\/span>\n   <\/li>\n   \n   \n   <li>\n    <span style=\"font-weight: 400;\">\n     1 x 400 points breadboard.\n    <\/span>\n   <\/li>\n   \n   \n   <li>\n    <span style=\"font-weight: 400;\">\n     M\/M and M\/F Jumper cables (all the components are available in the Official Starter Kit Arduino).\n    <\/span>\n   <\/li>\n   \n   \n   <li>\n    <span style=\"font-weight: 400;\">\n     6 x HC-SR04 ultrasonic sensors.\n    <\/span>\n   <\/li>\n   \n   \n   <li>\n    <span style=\"font-weight: 400;\">\n     7 x chainable RGB Grove LED v2.\n    <\/span>\n   <\/li>\n   \n   \n   <li>\n    <span style=\"font-weight: 400;\">\n     2 x pack of 5 5cm cables.\n    <\/span>\n   <\/li>\n   \n   \n   <li>\n    <span style=\"font-weight: 400;\">\n     A little less than 300g of filament (130g for the base, 65g for the plate and 75g for the lid). In my case, I used ivory white colored Chromatik filament\n    <\/span>\n   <\/li>\n   \n   \n   <li>\n    <span style=\"font-weight: 400;\">\n     <a href=\"\/en\/401937-set-of-400-m2x6-bolts-for-dynamixel-servomotors.html\">\n      M2 6mm bolts\n     <\/a>\n     and\n     <a href=\"\/en\/401967-set-of-400-n1-m2-nuts-for-dynamixel-servomotors.html\">\n      M2 nuts\n     <\/a>\n     , or double-sided tape.\n    <\/span>\n   <\/li>\n   \n   \n   <li>\n    <span style=\"font-weight: 400;\">\n     Recommended: 1 pack of 5 Grove male jumper cable.\n    <\/span>\n   <\/li>\n   \n   \n   <li>\n    <span style=\"font-weight: 400;\">\n     Optional: 1 x mural charger (compact USB charger 5V or a 7-12V power adapter, for example this one). If not, connect the USB cable to a computer port.\n    <\/span>\n   <\/li>\n   \n  <\/ul>\n  \n  \n  <h2 class=\"wp-block-heading\" id=\"h-software-and-libraries-to-download\">\n   Software and libraries to download\n  <\/h2>\n  \n  \n  <ul class=\"wp-block-list\">\n   \n   <li>\n    <span style=\"font-weight: 400;\">\n     <a href=\"https:\/\/www.arduino.cc\/\" title=\"Arduino website\">\n      IDE Arduino\n     <\/a>\n    <\/span>\n   <\/li>\n   \n   \n   <li>\n    <a href=\"https:\/\/playground.arduino.cc\/Code\/NewPing\">\n     <span style=\"font-weight: 400;\">\n      Newping library for HC-SR04 ultrasonic sensor\n     <\/span>\n    <\/a>\n   <\/li>\n   \n   \n   <li>\n    <span style=\"font-weight: 400;\">\n     <a href=\"https:\/\/github.com\/pjpmarques\/ChainableLED\">\n      Grove LED library\n     <\/a>\n    <\/span>\n   <\/li>\n   \n   \n   <li>\n    <span style=\"font-weight: 400;\">\n     <a href=\"https:\/\/bitbucket.org\/teckel12\/arduino-new-tone\/downloads\/\">\n      NewTone library\n     <\/a>\n    <\/span>\n   <\/li>\n   \n  <\/ul>\n  \n  \n  <h2 class=\"wp-block-heading\" id=\"h-assemble-your-lumina-lamp\">\n   Assemble your LUMINA lamp\n  <\/h2>\n  \n  \n  <p>\n   Place the\n   <strong>\n    Arduino board\n   <\/strong>\n   inside the case, as close as possible of the inside panel. Afterwards, attach the\n   <strong>\n    breadboard\n   <\/strong>\n   with the double-sided tape on the underside, so that the Arduino cannot move.\n  <\/p>\n  \n  \n  <figure class=\"wp-block-image aligncenter\">\n   <a href=\"https:\/\/blog.generationrobots.com\/wp-content\/uploads\/2018\/07\/tutoriel-arduino-assemblage-lumina-1.jpg\">\n    <img fetchpriority=\"high\" decoding=\"async\" width=\"300\" height=\"289\" alt=\"tutoriel-arduino-assemblage-lumina-1\" class=\"wp-image-4951\" src=\"https:\/\/blog.generationrobots.com\/wp-content\/uploads\/2018\/07\/tutoriel-arduino-assemblage-lumina-1-300x289.jpg\" srcset=\"https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2018\/07\/tutoriel-arduino-assemblage-lumina-1-300x289.jpg 300w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2018\/07\/tutoriel-arduino-assemblage-lumina-1.jpg 900w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/>\n   <\/a>\n  <\/figure>\n  \n  \n  <p>\n   Connect the\n   <strong>\n    ultrasonic sensors\n   <\/strong>\n   and the\n   <strong>\n    buzzer\n   <\/strong>\n   according to the\n   <strong>\n    Fritzing diagram\n   <\/strong>\n   . When the sonar 1 is integrated into the case, it must be placed above the Arduino\u2019s USB and jack connectors.\n  <\/p>\n  \n  \n  <figure class=\"wp-block-image alignnone\">\n   <a href=\"https:\/\/blog.generationrobots.com\/wp-content\/uploads\/2018\/07\/tutoriel-arduino-assemblage-lumina-20.jpg\">\n    <img decoding=\"async\" width=\"900\" height=\"551\" alt=\"tutoriel-arduino-assemblage-lumina-20\" class=\"wp-image-4960\" src=\"https:\/\/blog.generationrobots.com\/wp-content\/uploads\/2018\/07\/tutoriel-arduino-assemblage-lumina-20.jpg\" srcset=\"https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2018\/07\/tutoriel-arduino-assemblage-lumina-20.jpg 900w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2018\/07\/tutoriel-arduino-assemblage-lumina-20-300x184.jpg 300w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/>\n   <\/a>\n   <figcaption class=\"wp-element-caption\">\n    Sch\u00e9ma Fritzing\n   <\/figcaption>\n  <\/figure>\n  \n  \n  <p>\n   Attach the\n   <strong>\n    Grove LED modules\n   <\/strong>\n   to the underside of the intermediate plate. If you prefer using some double-sided tape than screwing the modules, base yourself on the position of the bolts passages, so as to orient the LEDs correctly.\n  <\/p>\n  \n  \n  <p>\n   <strong>\n    Connect\n   <\/strong>\n   the \u201cIN\u201d of the central LED (number 7) to the \u201cOUT\u201d of one of the peripheral LEDs. Then, connect the peripheral LEDs one by one, using the 5cm Grove cables. You can pull them off, for more flexibility.\n  <\/p>\n  \n  \n  <figure class=\"wp-block-image aligncenter\">\n   <a href=\"https:\/\/blog.generationrobots.com\/wp-content\/uploads\/2018\/07\/tutoriel-arduino-assemblage-lumina-4.jpg\">\n    <img decoding=\"async\" width=\"300\" height=\"282\" alt=\"tutoriel-arduino-assemblage-lumina-4\" class=\"wp-image-4954\" src=\"https:\/\/blog.generationrobots.com\/wp-content\/uploads\/2018\/07\/tutoriel-arduino-assemblage-lumina-4-300x282.jpg\" srcset=\"https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2018\/07\/tutoriel-arduino-assemblage-lumina-4-300x282.jpg 300w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2018\/07\/tutoriel-arduino-assemblage-lumina-4.jpg 900w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/>\n   <\/a>\n  <\/figure>\n  \n  \n  <p>\n   The \u201cIN\u201d of the last LED (number 1) must be connected to the Arduino (signal) on one side and to the breadboard (5V and ground) on the other side with a mixed Grove &#8211; jumper male cable.\n  <\/p>\n  \n  \n  <p>\n   <strong>\n    Close\n   <\/strong>\n   the box with the intermediate plate. The LED 1 (the one directly connected to the Arduino) must be above the sonar 1 (above the Arduino connectors).\n  <\/p>\n  \n  \n  <figure class=\"wp-block-image aligncenter\">\n   <a href=\"https:\/\/blog.generationrobots.com\/wp-content\/uploads\/2018\/07\/tutoriel-arduino-assemblage-lumina-5-e1532421109730.jpg\">\n    <img loading=\"lazy\" decoding=\"async\" width=\"534\" height=\"1022\" alt=\"tutoriel-arduino-assemblage-lumina-5\" class=\"wp-image-4955\" src=\"https:\/\/blog.generationrobots.com\/wp-content\/uploads\/2018\/07\/tutoriel-arduino-assemblage-lumina-5-e1532421109730.jpg\" srcset=\"https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2018\/07\/tutoriel-arduino-assemblage-lumina-5-e1532421109730.jpg 534w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2018\/07\/tutoriel-arduino-assemblage-lumina-5-e1532421109730-157x300.jpg 157w\" sizes=\"(max-width: 534px) 100vw, 534px\" \/>\n   <\/a>\n  <\/figure>\n  \n  \n  <p>\n   Before closing the lid, I recommend you to\n   <strong>\n    test\n   <\/strong>\n   your lamp. Just\n   <strong>\n    upload the code\n   <\/strong>\n   onto your Arduino board (you can download the code from our resources section, at the bottom of this page).\n  <\/p>\n  \n  \n  <p>\n   <strong>\n    OPTIONAL:\n   <\/strong>\n   screw the plate into the box (maybe you plan to have the lamp handled by children and need everything to be fastened). Be cautious, as the ultrasonic sensors can be pushed into the case, with a simple pressure (and this can prevent the lamp working correctly). If you wish to screw the plate, you will need to find a way to fasten the sensors. I am currently working on a solution!\n  <\/p>\n  \n  \n  <figure class=\"wp-block-image aligncenter\">\n   <a href=\"https:\/\/blog.generationrobots.com\/wp-content\/uploads\/2018\/07\/tutoriel-arduino-assemblage-lumina-8.jpg\">\n    <img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"145\" alt=\"tutoriel-arduino-assemblage-lumina-8\" class=\"wp-image-4957\" src=\"https:\/\/blog.generationrobots.com\/wp-content\/uploads\/2018\/07\/tutoriel-arduino-assemblage-lumina-8-300x145.jpg\" srcset=\"https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2018\/07\/tutoriel-arduino-assemblage-lumina-8-300x145.jpg 300w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2018\/07\/tutoriel-arduino-assemblage-lumina-8.jpg 900w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/>\n   <\/a>\n  <\/figure>\n  \n  \n  <p>\n   <strong>\n    Position the lid\n   <\/strong>\n   . Normally, all parts should fit comfortably! You can now\n   <strong>\n    power\n   <\/strong>\n   your lamp (USB or jack ports) and start using LUMINA!\n  <\/p>\n  \n  \n  <figure class=\"wp-block-image aligncenter\">\n   <a href=\"https:\/\/blog.generationrobots.com\/wp-content\/uploads\/2018\/07\/tutoriel-arduino-assemblage-lumina-10.jpg\">\n    <img loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"546\" alt=\"tutoriel-arduino-assemblage-lumina-10\" class=\"wp-image-4958\" src=\"https:\/\/blog.generationrobots.com\/wp-content\/uploads\/2018\/07\/tutoriel-arduino-assemblage-lumina-10.jpg\" srcset=\"https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2018\/07\/tutoriel-arduino-assemblage-lumina-10.jpg 900w, https:\/\/www.generationrobots.com\/blog\/wp-content\/uploads\/2018\/07\/tutoriel-arduino-assemblage-lumina-10-300x182.jpg 300w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/>\n   <\/a>\n  <\/figure>\n  \n  \n  <h2 class=\"wp-block-heading\" id=\"h-how-does-lumina-work\">\n   How does LUMINA work?\n  <\/h2>\n  \n  \n  <p>\n   To date, LUMINA lets you switch between 4 operation modes and one selection mode.\n  <\/p>\n  \n  \n  <h3 class=\"wp-block-heading\" id=\"h-mode-1-manual-variation\">\n   Mode 1: manual variation\n  <\/h3>\n  \n  \n  <p>\n   Three ultrasonic sensors will\n   <strong>\n    increase the value\n   <\/strong>\n   of the red, blue and green components\n   <strong>\n    in stages\n   <\/strong>\n   , and the other three will\n   <strong>\n    decrease these same values\n   <\/strong>\n   . The change is applied uniformly to all the LEDs. A subroutine is used to modify the value of the threshold, in order to accelerate the color changes. Accessible by keeping the sonar\n   <strong>\n    2 and 5*\n   <\/strong>\n   activated at the same time.\n  <\/p>\n  \n  \n  <h3 class=\"wp-block-heading\" id=\"h-mode-2-automatic-variation\">\n   Mode 2: automatic variation\n  <\/h3>\n  \n  \n  <p>\n   <strong>\n    Together, the LEDs scan the color spectrum\n   <\/strong>\n   . This is one of the demo codes of the library I used. A subroutine has been added to allow a variation of the scan speed. Accessible by keeping sonar 2\n   <strong>\n    and 5*\n   <\/strong>\n   activated at the same time.\n  <\/p>\n  \n  \n  <h3 class=\"wp-block-heading\" id=\"h-mode-3-luminous-piano\">\n   Mode 3: luminous piano\n  <\/h3>\n  \n  \n  <p>\n   Each sonar is associated with the LED above it, itself associated with a color. Activating a sonar turns on the corresponding LED with its matching color. When the sonar is no longer active, the LED gradually dims until it fade out.\n  <\/p>\n  \n  \n  <p>\n   Several LEDs can be lit at the same time. The top LED lights up in white and has its intensity aligned with the last LED activated.\n   <strong>\n    Each sonar is also associated with a musical note, played by the buzzer as long as the LED is on.\n   <\/strong>\n   A subroutine allows the duration of the gradient speed to be varied from the moment the sonar is released (between approximately 0 and 5 seconds). Accessible by keeping sonar\n   <strong>\n    2 and 5*\n   <\/strong>\n   activated at the same time.\n  <\/p>\n  \n  \n  <h3 class=\"wp-block-heading\" id=\"h-mode-4-simon-the-famous-game\">\n   Mode 4: Simon: the famous game.\n  <\/h3>\n  \n  \n  <p>\n   <strong>\n    The lamp plays a sequence of LEDs accompanied by musical notes, which the player must play again by activating the correct sonars.\n   <\/strong>\n   The game starts with a sequence of 3, incremented at each success, up to a sequence of 10. A success triggers a small green animation, and the next level. A success at the level 10 ends the game. A failure triggers a little red animation and plays back the sequence in progress. The third failure expels the player from the game. The player is subjected to a timer to play his sequence. At the end of the timer, the player is eliminated. In all these cases, the lamp switches back to Mode 2 &#8211; automatic variation.\n  <\/p>\n  \n  \n  <p>\n   Accessible from all modes except Simon, by keeping sonars\n   <strong>\n    1 and 4*\n   <\/strong>\n   activated. LEDs 1 to 4* light up in white and vary in intensity. Extended activation of one of these sonars will activate the corresponding mode. LEDs 5 and 6* send the player into automatic variation mode. Likewise when the timer expires.\n  <\/p>\n  \n  \n  <p>\n   *number according to photos and Fritzing diagram, not according to code.\n  <\/p>\n  \n  \n  <h2 class=\"wp-block-heading\" id=\"h-genesis-of-the-lumina-project\">\n   Genesis of the LUMINA project\n  <\/h2>\n  \n  \n  <p>\n   The idea to create this lamp came up to me while watching videos of the Bare Conductive kits (especially the capacitive sensor controlled lamps). I already own a 3D printer, and I had noticed that sufficiently thin prints could give a nice transparency effects, that could be use for a project that involves lights.\n  <\/p>\n  \n  \n  <p>\n   <strong>\n    I lacked knowledge in electronics, but the prospect of being able to complete a DIY project by myself, thanks to 3D printing, was a powerful motivational source!\n   <\/strong>\n  <\/p>\n  \n  \n  <h2 class=\"wp-block-heading\" id=\"h-the-choice-of-platforms\">\n   The choice of platforms\n  <\/h2>\n  \n  \n  <h3 class=\"wp-block-heading\" id=\"h-the-microcontroller\">\n   The microcontroller\n  <\/h3>\n  \n  \n  <p>\n   Having just started programming in Arduino a few months ago,\n   <strong>\n    I own the famous Uno R3 for beginner\n   <\/strong>\n   . Hence, the obvious choice for me was to use this board and code on the Arduino IDE!\n  <\/p>\n  \n  \n  <p>\n   This being said, it would be possible to use\n   <strong>\n    any other board in the Arduino family\n   <\/strong>\n   , or even any other microcontroller (\n   <strong>\n    <a href=\"\/en\/214-raspberry-pi-boards\">\n     Raspberry Pi\n    <\/a>\n    , for those who like to code in Python\n   <\/strong>\n   , for example).\n  <\/p>\n  \n  \n  <p>\n   However to those who would like to reproduce the project with a micro:bit, be careful: even if it is possible to have enough pins thanks to the addition of a breakout, the board delivers a voltage of 3.3V, not enough power to supply to make sensors work together.\n  <\/p>\n  \n  \n  <h3 class=\"wp-block-heading\" id=\"h-the-sensors\">\n   The sensors\n  <\/h3>\n  \n  \n  <p>\n   I would have loved using capacitive conductive paint sensors, but they need to be big enough to be effective. I didn\u2019t want the lamp to be to big, and needed a more compact solution.\n   <strong>\n    The HC-SR04 ultrasonic sensors are interesting though, as they are both inexpensive and they have a wide detection range.\n   <\/strong>\n   Infrared sensors, such as the\n   <a href=\"\/en\/\">\n    Pololu\n   <\/a>\n   sensors, can work as well.\n  <\/p>\n  \n  \n  <h3 class=\"wp-block-heading\" id=\"h-leds\">\n   LEDs\n  <\/h3>\n  \n  \n  <p>\n   I hesitated for a while with Neopixel RGB LEDs, but Grove chainable LEDs offers\n   <strong>\n    the significant advantage of a connection without soldering\n   <\/strong>\n   . Plus they have holes so that can be fasten more easily to any frame. Both references have\n   <strong>\n    ready-made Arduino libraries\n   <\/strong>\n   .\n  <\/p>\n  \n  \n  <h3 class=\"wp-block-heading\" id=\"h-the-3d-printer\">\n   The 3D printer\n  <\/h3>\n  \n  \n  <p>\n   Personally, I used my faithful Neva 3D printer (from Dagoma).\n   <strong>\n    For the settings, I chose 0.2mm and with a fast speed, which is more than enough to allows to render a very satisfactory result\n   <\/strong>\n   . All parts fit together! I used an ivory\u00a0coloured filament (the one I usually choose for my prototypes). The panel are thin, giving to the ensemble a nice diffusion glow, while absorbing the excess of brightness.\n  <\/p>\n  \n  \n  <p>\n   NB: The box dimensions fit perfectly on the Neva\u2019s printing surface.\n   <strong>\n    Be careful\n   <\/strong>\n   to immediately remove the small piece that the Neva printer at the beginning, before the nozzle passes over it again.\n  <\/p>\n  \n  \n  <h3 class=\"wp-block-heading\" id=\"h-software-tools\">\n   Software tools\n  <\/h3>\n  \n  \n  <p>\n   The program has been coded in the Arduino IDE. A small tip I share with you: use the NewPing library for the ultrasonic sensors. The HC-SR04 are all connected to the same pin for the trigger, and this caused malfunctions with the \u201cbasic\u201d Ping library.\n   <strong>\n    Note that the MakeBlock software \u201cmBlock\u201d allows you to program Arduino boards in programming visual language.\n   <\/strong>\n  <\/p>\n  \n  \n  <p>\n   I used\n   <strong>\n    <a href=\"https:\/\/www.tinkercad.com\/\">\n     Tinkercad\n    <\/a>\n    to design the different box parts. Tinkercad is a free and user friendly online interface\n   <\/strong>\n   . You design the parts by adding and subtracting more or less complex geometric shapes. It is possible to create very elaborate shapess. There are many online video tutorials.\n  <\/p>\n  \n  \n  <h2 class=\"wp-block-heading\" id=\"h-a-few-tips\">\n   A few tips\n  <\/h2>\n  \n  \n  <p>\n   As a beginner, there is something exhilarating about your first electronic project. On the other hand, it can also be the source of frustration, faced with unexpected complications or incomprehensible bugs. Here are some suggestions which I hope will help my novice comrades not to fall into discouragement.\n  <\/p>\n  \n  \n  <h3 class=\"wp-block-heading\" id=\"h-have-a-clear-idea-of-what-you-want-to-do\">\n   Have a clear idea of what you want to do:\n  <\/h3>\n  \n  \n  <p>\n   As in any creative process, one of the main dangers is to get lost along the way, there is so much possibilities!\n   <strong>\n    Keep the final objective clearly in mind during every step of your project\n   <\/strong>\n   s!\n  <\/p>\n  \n  \n  <h3 class=\"wp-block-heading\" id=\"h-start-small\">\n   Start small:\n  <\/h3>\n  \n  \n  <p>\n   Rome wasn\u2019t built in a day! If you\u2019re just starting out, don\u2019t start too big. It\u2019s ok if you don\u2019t create a killer invention on your first try! Don\u2019t worry: your friends are beginners just like you, and even a simple DIY project based on obstacle detection and flashing LED should be enough to dazzle them and have them in awe of your new programming skills!\n   <strong>\n    Plus, you can always improve your invention as your knowledge grows!\n   <\/strong>\n  <\/p>\n  \n  \n  <h3 class=\"wp-block-heading\" id=\"h-find-a-code-name-for-your-project\">\n   Find a code name for your project:\n  <\/h3>\n  \n  \n  <p>\n   Because it\u2019s cool. I confess, LUMINA may not win the prize of originality, but if you have several projects at the same time, having a small name for each one\n   <strong>\n    will help you find your way around.\n   <\/strong>\n  <\/p>\n  \n  \n  <h3 class=\"wp-block-heading\" id=\"h-invest-in-pencil-and-paper\">\n   Invest in pencil and paper:\n  <\/h3>\n  \n  \n  <p>\n   Each time I had a new idea and wanted to go type right away a piece of code in the programming interface, I got lost for hours because I didn\u2019t plan out the code instructions ahead.\n   <br\/>\n   So, before you throw yourself on your keyboard, take a deep breath, sharpen your pencil and eraser, and\u2026 think. \u201c\n   <strong>\n    Whatever is well conceived is clearly said, And the words to say it flow with ease.\n   <\/strong>\n   \u201d Nicolas Boileau\u2019s quote also applies to programming! You\u2019ll see, pencil and paper are a real time saver!\n  <\/p>\n  \n  \n  <h3 class=\"wp-block-heading\" id=\"h-go-to-an-info-scavenger-hunt\">\n   Go to an info scavenger hunt!\n  <\/h3>\n  \n  \n  <p>\n   Working with geeks makes it easier when you decide to have a go at an electronic and programming DIY project! They can help you when you run into difficulties! If you don\u2019t have any geeks in your acquaintances, don\u2019t panic!\n   <strong>\n    The internet is a wonderful thing if you need to get help on this kind of project!\n   <\/strong>\n   <strong>\n    Manufacturers websites\n   <\/strong>\n   , whether it\u2019s Arduino, Raspberry Pi, Python, micro:bit, gives out a lot of useful info&#8230; And also, a simple Google with a few well-chosen keywords will get you back on track!\n  <\/p>\n  \n  \n  <h3 class=\"wp-block-heading\" id=\"h-back-to-the-basics\">\n   Back to the basics:\n  <\/h3>\n  \n  \n  <p>\n   Many errors in programming come from silly syntax errors, if though you read your code multiple times! A classic: the notation \u201cif a=0\u201d, where we should write \u201c\n   <strong>\n    if a==0\n   <\/strong>\n   \u201d. Enough to drive you crazy. If there is a bug in your program, check even the most elementary syntaxes and instructions.\n  <\/p>\n  \n  \n  <h3 class=\"wp-block-heading\" id=\"h-comply-with-programming-conventions\">\n   Comply with programming conventions\n  <\/h3>\n  \n  \n  <p>\n   Because you may not be the only one reading your code, or simply because you will sometimes need to come back to it after several weeks:\n   <strong>\n    follow the good practices in terms of presentation (indentation, my love!) and don\u2019t forget to comment!\n   <\/strong>\n   Again, you will save time and comfort!\n  <\/p>\n  \n  \n  <h3 class=\"wp-block-heading\" id=\"h-have-fun\">\n   Have fun!\n  <\/h3>\n  \n  \n  <p>\n   If you are interested in this tutorial, then you\u2019re probably an amateur programmer. Learning how to code is exciting, but can also have some daunting and limiting aspects. So, in order to avoid being discouraged, always make sure you do something you like!\n  <\/p>\n  \n  \n  <h2 class=\"wp-block-heading\" id=\"h-resources-of-the-arduino-tutorial-creating-a-diy-lamp-lumina\">\n   Resources of the Arduino tutorial &#8211; Creating a DIY lamp \u201cLUMINA\u201d\n  <\/h2>\n  \n  \n  <ul class=\"wp-block-list\">\n   \n   <li>\n    <span style=\"font-weight: 400;\">\n     <a href=\"\/media\/tutoriel-arduino-lumina-fichiers-3d.zip\">\n      STL files for the box: case, fixing plate, lid\n     <\/a>\n    <\/span>\n   <\/li>\n   \n   \n   <li>\n    <span style=\"font-weight: 400;\">\n     <a href=\"\/media\/tutoriel-arduino-lumina-code.zip\">\n      Arduino code.\n     <\/a>\n     It\u2019s heavy. It\u2019s clumsy. It\u2019s not necessarily very well indented, nor very well commented. But it works! Improvements are welcome!\n    <\/span>\n   <\/li>\n   \n  <\/ul>\n  \n <\/body>\n<\/html>","protected":false},"excerpt":{"rendered":"<p>This Arduino based project tutorial was created by an amateur and is mainly aimed at other amateurs, or anyone with a bit of curiosity for this type of electronic DIY projects. The author appeals in advance to the benevolence of the venerable experts whom would like to dig a little in the code or in[&#8230;]<br \/> <a class=\"button\" href=\"https:\/\/www.generationrobots.com\/blog\/en\/arduino-tutorial-creation-of-a-diy-lamp-lumina\/\" style=\"float:right;\">Read this article &gt;&gt;<\/a><\/p>\n","protected":false},"author":188,"featured_media":4967,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1132],"tags":[],"class_list":["post-4976","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-education-en"],"_links":{"self":[{"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/posts\/4976","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/users\/188"}],"replies":[{"embeddable":true,"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/comments?post=4976"}],"version-history":[{"count":6,"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/posts\/4976\/revisions"}],"predecessor-version":[{"id":13639,"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/posts\/4976\/revisions\/13639"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/media\/4967"}],"wp:attachment":[{"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/media?parent=4976"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/categories?post=4976"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.generationrobots.com\/blog\/wp-json\/wp\/v2\/tags?post=4976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}