Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
89
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int tonePin = 11;
  2. void setup() {
  3. pinMode(13, OUTPUT);
  4. }
  5.  
  6.  
  7. void loop() {
  8. music();
  9. led();
  10. }
  11.  
  12. void music(){
  13.  
  14. tone(tonePin, 1318, 393.74960625);
  15. delay(397.726875);
  16. delay(21.853125);
  17. tone(tonePin, 987, 196.44211125);
  18. delay(198.426375);
  19. delay(11.363625);
  20. tone(tonePin, 1046, 196.44211125);
  21. delay(198.426375);
  22. delay(11.363625);
  23. tone(tonePin, 1174, 393.74960625);
  24. delay(397.726875);
  25. delay(21.853125);
  26. tone(tonePin, 1046, 196.44211125);
  27. delay(198.426375);
  28. delay(11.363625);
  29. tone(tonePin, 987, 196.44211125);
  30. delay(198.426375);
  31. delay(11.363625);
  32. tone(tonePin, 880, 393.74960625);
  33. delay(397.726875);
  34. delay(21.853125);
  35. tone(tonePin, 880, 196.44211125);
  36. delay(198.426375);
  37. delay(11.363625);
  38. tone(tonePin, 1046, 196.44211125);
  39. delay(198.426375);
  40. delay(11.363625);
  41. tone(tonePin, 1318, 393.74960625);
  42. delay(397.726875);
  43. delay(21.853125);
  44. tone(tonePin, 1174, 196.44211125);
  45. delay(198.426375);
  46. delay(11.363625);
  47. tone(tonePin, 1046, 196.44211125);
  48. delay(198.426375);
  49. delay(11.363625);
  50. tone(tonePin, 987, 393.74960625);
  51. delay(397.726875);
  52. delay(231.643125);
  53. tone(tonePin, 1046, 196.44211125);
  54. delay(198.426375);
  55. delay(11.363625);
  56. tone(tonePin, 1174, 393.74960625);
  57. delay(397.726875);
  58. delay(21.853125);
  59. tone(tonePin, 1318, 393.74960625);
  60. delay(397.726875);
  61. delay(21.853125);
  62. tone(tonePin, 1046, 393.74960625);
  63. delay(397.726875);
  64. delay(21.853125);
  65. tone(tonePin, 880, 393.74960625);
  66. delay(397.726875);
  67. delay(21.853125);
  68. tone(tonePin, 880, 788.36459625);
  69. delay(796.327875);
  70. delay(252.622125);
  71. tone(tonePin, 1174, 393.74960625);
  72. delay(397.726875);
  73. delay(21.853125);
  74. tone(tonePin, 1396, 196.44211125);
  75. delay(198.426375);
  76. delay(11.363625);
  77. tone(tonePin, 1760, 393.74960625);
  78. delay(397.726875);
  79. delay(21.853125);
  80. tone(tonePin, 1567, 196.44211125);
  81. delay(198.426375);
  82. delay(11.363625);
  83. tone(tonePin, 1396, 196.44211125);
  84. delay(198.426375);
  85. delay(11.363625);
  86. tone(tonePin, 1318, 393.74960625);
  87. delay(397.726875);
  88. delay(231.643125);
  89. tone(tonePin, 1046, 196.44211125);
  90. delay(198.426375);
  91. delay(11.363625);
  92. tone(tonePin, 1318, 393.74960625);
  93. delay(397.726875);
  94. delay(21.853125);
  95. tone(tonePin, 1174, 196.44211125);
  96. delay(198.426375);
  97. delay(11.363625);
  98. tone(tonePin, 1046, 196.44211125);
  99. delay(198.426375);
  100. delay(11.363625);
  101. tone(tonePin, 987, 393.74960625);
  102. delay(397.726875);
  103. delay(21.853125);
  104. tone(tonePin, 987, 196.44211125);
  105. delay(198.426375);
  106. delay(11.363625);
  107. tone(tonePin, 1046, 196.44211125);
  108. delay(198.426375);
  109. delay(11.363625);
  110. tone(tonePin, 1174, 393.74960625);
  111. delay(397.726875);
  112. delay(21.853125);
  113. tone(tonePin, 1318, 393.74960625);
  114. delay(397.726875);
  115. delay(21.853125);
  116. tone(tonePin, 1046, 393.74960625);
  117. delay(397.726875);
  118. delay(21.853125);
  119. tone(tonePin, 880, 393.74960625);
  120. delay(397.726875);
  121. delay(21.853125);
  122. tone(tonePin, 880, 788.36459625);
  123. delay(796.327875);
  124. delay(42.832125);
  125. tone(tonePin, 1318, 393.74960625);
  126. delay(397.726875);
  127. delay(21.853125);
  128. tone(tonePin, 987, 196.44211125);
  129. delay(198.426375);
  130. delay(11.363625);
  131. tone(tonePin, 1046, 196.44211125);
  132. delay(198.426375);
  133. delay(11.363625);
  134. tone(tonePin, 1174, 393.74960625);
  135. delay(397.726875);
  136. delay(21.853125);
  137. tone(tonePin, 1046, 196.44211125);
  138. delay(198.426375);
  139. delay(11.363625);
  140. tone(tonePin, 987, 196.44211125);
  141. delay(198.426375);
  142. delay(11.363625);
  143. tone(tonePin, 880, 393.74960625);
  144. delay(397.726875);
  145. delay(21.853125);
  146. tone(tonePin, 880, 196.44211125);
  147. delay(198.426375);
  148. delay(11.363625);
  149. tone(tonePin, 1046, 196.44211125);
  150. delay(198.426375);
  151. delay(11.363625);
  152. tone(tonePin, 1318, 393.74960625);
  153. delay(397.726875);
  154. delay(21.853125);
  155. tone(tonePin, 1174, 196.44211125);
  156. delay(198.426375);
  157. delay(11.363625);
  158. tone(tonePin, 1046, 196.44211125);
  159. delay(198.426375);
  160. delay(11.363625);
  161. tone(tonePin, 987, 393.74960625);
  162. delay(397.726875);
  163. delay(231.643125);
  164. tone(tonePin, 1046, 196.44211125);
  165. delay(198.426375);
  166. delay(11.363625);
  167. tone(tonePin, 1174, 393.74960625);
  168. delay(397.726875);
  169. delay(21.853125);
  170. tone(tonePin, 1318, 393.74960625);
  171. delay(397.726875);
  172. delay(21.853125);
  173. tone(tonePin, 1046, 393.74960625);
  174. delay(397.726875);
  175. delay(21.853125);
  176. tone(tonePin, 880, 393.74960625);
  177. delay(397.726875);
  178. delay(21.853125);
  179. tone(tonePin, 880, 788.36459625);
  180. delay(796.327875);
  181. delay(252.622125);
  182. tone(tonePin, 1174, 393.74960625);
  183. delay(397.726875);
  184. delay(21.853125);
  185. tone(tonePin, 1396, 196.44211125);
  186. delay(198.426375);
  187. delay(11.363625);
  188. tone(tonePin, 1760, 393.74960625);
  189. delay(397.726875);
  190. delay(21.853125);
  191. tone(tonePin, 1567, 196.44211125);
  192. delay(198.426375);
  193. delay(11.363625);
  194. tone(tonePin, 1396, 196.44211125);
  195. delay(198.426375);
  196. delay(11.363625);
  197. tone(tonePin, 1318, 393.74960625);
  198. delay(397.726875);
  199. delay(231.643125);
  200. tone(tonePin, 1046, 196.44211125);
  201. delay(198.426375);
  202. delay(11.363625);
  203. tone(tonePin, 1318, 393.74960625);
  204. delay(397.726875);
  205. delay(21.853125);
  206. tone(tonePin, 1174, 196.44211125);
  207. delay(198.426375);
  208. delay(11.363625);
  209. tone(tonePin, 1046, 196.44211125);
  210. delay(198.426375);
  211. delay(11.363625);
  212. tone(tonePin, 987, 393.74960625);
  213. delay(397.726875);
  214. delay(21.853125);
  215. tone(tonePin, 987, 196.44211125);
  216. delay(198.426375);
  217. delay(11.363625);
  218. tone(tonePin, 1046, 196.44211125);
  219. delay(198.426375);
  220. delay(11.363625);
  221. tone(tonePin, 1174, 393.74960625);
  222. delay(397.726875);
  223. delay(21.853125);
  224. tone(tonePin, 1318, 393.74960625);
  225. delay(397.726875);
  226. delay(21.853125);
  227. tone(tonePin, 1046, 393.74960625);
  228. delay(397.726875);
  229. delay(21.853125);
  230. tone(tonePin, 880, 393.74960625);
  231. delay(397.726875);
  232. delay(21.853125);
  233. tone(tonePin, 880, 788.36459625);
  234. delay(796.327875);
  235. delay(42.832125);
  236. tone(tonePin, 1318, 788.36459625);
  237. delay(796.327875);
  238. delay(42.832125);
  239. tone(tonePin, 1046, 788.36459625);
  240. delay(796.327875);
  241. delay(42.832125);
  242. tone(tonePin, 1174, 788.36459625);
  243. delay(796.327875);
  244. delay(42.832125);
  245. tone(tonePin, 987, 788.36459625);
  246. delay(796.327875);
  247. delay(42.832125);
  248. tone(tonePin, 1046, 788.36459625);
  249. delay(796.327875);
  250. delay(42.832125);
  251. tone(tonePin, 880, 788.36459625);
  252. delay(796.327875);
  253. delay(42.832125);
  254. tone(tonePin, 830, 788.36459625);
  255. delay(796.327875);
  256. delay(42.832125);
  257. tone(tonePin, 987, 393.74960625);
  258. delay(397.726875);
  259. delay(441.433125);
  260. tone(tonePin, 1318, 788.36459625);
  261. delay(796.327875);
  262. delay(42.832125);
  263. tone(tonePin, 1046, 788.36459625);
  264. delay(796.327875);
  265. delay(42.832125);
  266. tone(tonePin, 1174, 788.36459625);
  267. delay(796.327875);
  268. delay(42.832125);
  269. tone(tonePin, 987, 788.36459625);
  270. delay(796.327875);
  271. delay(42.832125);
  272. tone(tonePin, 1046, 393.74960625);
  273. delay(397.726875);
  274. delay(21.853125);
  275. tone(tonePin, 1318, 393.74960625);
  276. delay(397.726875);
  277. delay(21.853125);
  278. tone(tonePin, 1760, 393.74960625);
  279. delay(397.726875);
  280. delay(21.853125);
  281. tone(tonePin, 1760, 393.74960625);
  282. delay(397.726875);
  283. delay(21.853125);
  284. tone(tonePin, 1661, 393.74960625);
  285. delay(397.726875);
  286. delay(1280.593125);
  287. tone(tonePin, 1318, 393.74960625);
  288. delay(397.726875);
  289. delay(21.853125);
  290. tone(tonePin, 987, 196.44211125);
  291. delay(198.426375);
  292. delay(11.363625);
  293. tone(tonePin, 1046, 196.44211125);
  294. delay(198.426375);
  295. delay(11.363625);
  296. tone(tonePin, 1174, 393.74960625);
  297. delay(397.726875);
  298. delay(21.853125);
  299. tone(tonePin, 1046, 196.44211125);
  300. delay(198.426375);
  301. delay(11.363625);
  302. tone(tonePin, 987, 196.44211125);
  303. delay(198.426375);
  304. delay(11.363625);
  305. tone(tonePin, 880, 393.74960625);
  306. delay(397.726875);
  307. delay(21.853125);
  308. tone(tonePin, 880, 196.44211125);
  309. delay(198.426375);
  310. delay(11.363625);
  311. tone(tonePin, 1046, 196.44211125);
  312. delay(198.426375);
  313. delay(11.363625);
  314. tone(tonePin, 1318, 393.74960625);
  315. delay(397.726875);
  316. delay(21.853125);
  317. tone(tonePin, 1174, 196.44211125);
  318. delay(198.426375);
  319. delay(11.363625);
  320. tone(tonePin, 1046, 196.44211125);
  321. delay(198.426375);
  322. delay(11.363625);
  323. tone(tonePin, 987, 393.74960625);
  324. delay(397.726875);
  325. delay(21.853125);
  326. tone(tonePin, 987, 196.44211125);
  327. delay(198.426375);
  328. delay(11.363625);
  329. tone(tonePin, 1046, 196.44211125);
  330. delay(198.426375);
  331. delay(11.363625);
  332. tone(tonePin, 1174, 393.74960625);
  333. delay(397.726875);
  334. delay(21.853125);
  335. tone(tonePin, 1318, 393.74960625);
  336. delay(397.726875);
  337. delay(21.853125);
  338. tone(tonePin, 1046, 393.74960625);
  339. delay(397.726875);
  340. delay(21.853125);
  341. tone(tonePin, 880, 393.74960625);
  342. delay(397.726875);
  343. delay(21.853125);
  344. tone(tonePin, 880, 788.36459625);
  345. delay(796.327875);
  346. delay(252.622125);
  347. tone(tonePin, 1174, 393.74960625);
  348. delay(397.726875);
  349. delay(21.853125);
  350. tone(tonePin, 1396, 196.44211125);
  351. delay(198.426375);
  352. delay(11.363625);
  353. tone(tonePin, 1760, 393.74960625);
  354. delay(397.726875);
  355. delay(21.853125);
  356. tone(tonePin, 1567, 196.44211125);
  357. delay(198.426375);
  358. delay(11.363625);
  359. tone(tonePin, 1396, 196.44211125);
  360. delay(198.426375);
  361. delay(11.363625);
  362. tone(tonePin, 1318, 393.74960625);
  363. delay(397.726875);
  364. delay(231.643125);
  365. tone(tonePin, 1046, 196.44211125);
  366. delay(198.426375);
  367. delay(11.363625);
  368. tone(tonePin, 1318, 393.74960625);
  369. delay(397.726875);
  370. delay(21.853125);
  371. tone(tonePin, 1174, 196.44211125);
  372. delay(198.426375);
  373. delay(11.363625);
  374. tone(tonePin, 1046, 196.44211125);
  375. delay(198.426375);
  376. delay(11.363625);
  377. tone(tonePin, 987, 393.74960625);
  378. delay(397.726875);
  379. delay(21.853125);
  380. tone(tonePin, 987, 196.44211125);
  381. delay(198.426375);
  382. delay(11.363625);
  383. tone(tonePin, 1046, 196.44211125);
  384. delay(198.426375);
  385. delay(11.363625);
  386. tone(tonePin, 1174, 393.74960625);
  387. delay(397.726875);
  388. delay(21.853125);
  389. tone(tonePin, 1318, 393.74960625);
  390. delay(397.726875);
  391. delay(21.853125);
  392. tone(tonePin, 1046, 393.74960625);
  393. delay(397.726875);
  394. delay(21.853125);
  395. tone(tonePin, 1661, 393.74960625);
  396. delay(397.726875);
  397. delay(21.853125);
  398. tone(tonePin, 1760, 788.36459625);
  399. delay(2000);
  400. }
  401.  
  402. void led(){
  403. digitalWrite(9,HIGH);
  404. delay(1000);
  405. digitalWrite(9,LOW);
  406. delay(1000);
  407.  
  408. }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement