Stap 2: De Arduino schets
Maak een nieuwe schets in de Arduino IDE voor Edison en sla dit met de volgende code:
/*<br> theremin_edison.ino Part of "Intel IoT Edison sonar theremin" Copyright 2014 Pavlos Iliopoulos, techprolet.com This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <a href="http://www.gnu.org/licenses/" rel="nofollow">http://www.gnu.org/licenses/</a>. HC-SR04 Ping distance sensor code from jsvester<a href="
Zoals het nu het geval is, zal de bovenstaande code produceren pentatonische melodieën. Als u liever een grote of dodekafone, uncomment de respectieve regels aan de bovenkant van de code en het commentaar uit de pentatonische deel.
Controleer dat de code wordt gecompileerd en uploaden naar uw Intel® Edison.
U bent nu klaar om te produceren wat (beep beep) muziek! Zorgvuldige echter omdat de Grove zoemer ingeschakeld om worden veel luider dan verwacht worden:)