This shows you the differences between two versions of the page.
|
pm:prj2022:avaduva:control_your_lighting_with_your_phone [2022/05/27 00:43] moad.asehraoui [General Description] |
pm:prj2022:avaduva:control_your_lighting_with_your_phone [2022/05/27 23:45] (current) moad.asehraoui [Download] |
||
|---|---|---|---|
| Line 26: | Line 26: | ||
| - | {{:pm:prj2022:avaduva:mo-schema.png?|100}} | + | {{ :pm:prj2022:avaduva:mo-schema.png?650 |}} |
| </note> | </note> | ||
| Line 42: | Line 42: | ||
| ===== Software Design ===== | ===== Software Design ===== | ||
| - | |||
| - | |||
| - | <note type> | ||
| Description of the application code (firmware): | Description of the application code (firmware): | ||
| * Press Button B to restart and to set the counter to 0 while hearing a music(power up) | * Press Button B to restart and to set the counter to 0 while hearing a music(power up) | ||
| * Once the acceleration is greater than (>) 1000, the variables are increased | * Once the acceleration is greater than (>) 1000, the variables are increased | ||
| * Measure the calories burned, the durataon and the speed as well | * Measure the calories burned, the durataon and the speed as well | ||
| + | |||
| + | <note type> | ||
| + | |||
| + | While true : | ||
| + | if accelerometer.get_y() > 1000: | ||
| + | steps += 1 | ||
| + | counter2 += 1 | ||
| + | display.scroll(steps) | ||
| + | if counter2 == 10: | ||
| + | calories = calories + 40.4 | ||
| + | distance += 0.0006 | ||
| + | speed = accelerometer.get_y() | ||
| + | counter2 = 0 | ||
| | | ||
| </note> | </note> | ||
| + | |||
| + | The functions for Button A and B : | ||
| + | |||
| + | <note type> | ||
| + | |||
| + | |||
| + | if button_a.is_pressed(): | ||
| + | music.play(music.POWER_UP) | ||
| + | display.scroll("restart") | ||
| + | sleep(300) | ||
| + | calories = 0 | ||
| + | distance = 0 | ||
| + | steps = 0 | ||
| + | counter = 0 | ||
| + | counter2 = 0 | ||
| + | time1 = running_time() | ||
| + | if button_b.is_pressed(): | ||
| + | time2 = running_time() | ||
| + | time = (time2 - time1)/1000 | ||
| + | music.play(music.POWER_DOWN) | ||
| + | display.scroll("Duration:") | ||
| + | display.scroll(time) | ||
| + | sleep(300) | ||
| + | ...... | ||
| + | | ||
| + | </note> | ||
| + | |||
| ===== Results Obtained ===== | ===== Results Obtained ===== | ||
| <note type> | <note type> | ||
| - | What were the results of your project? | + | Here is some pictures of the results and the link for the video as well: |
| + | |||
| + | {{ :pm:prj2022:avaduva:moad1.jpeg?300 |}} {{ :pm:prj2022:avaduva:moad3.jpeg?300 |}} | ||
| + | |||
| + | {{ :pm:prj2022:avaduva:moad2.jpeg?300 |}} {{ :pm:prj2022:avaduva:moad4.jpeg?300 |}} | ||
| + | |||
| + | Links of the Video : | ||
| + | |||
| + | Drive : [[https://drive.google.com/file/d/13ngXFNZwSfSHbOHqf-ctTG2ivulbxQru/view?usp=sharing]] | ||
| + | |||
| + | Youtube : [[https://youtu.be/Hnfv7vRd2BI]] | ||
| + | |||
| </note> | </note> | ||
| ===== Conclusions ===== | ===== Conclusions ===== | ||
| + | |||
| + | The Micro Bit (also referred to as BBC Micro Bit, stylized as Micro:bit) is an open source hardware ARM-based embedded system designed by the BBC for use in computer education, that it can be a digital watch,a games console or fitness tracker and stepcounter as i did in my project. | ||
| + | |||
| + | The project can be also improved by adding some functions like the accelerometer so he can measure forces in 3 dimensions, called the X, Y and Z axes. You can modify the code to choose which axis to measure, depending on which way up you fix your micro:bit to your leg or shoe. | ||
| ===== Download ===== | ===== Download ===== | ||
| <note warning> | <note warning> | ||
| - | An archive (or more if necessary) with the files obtained from the project: sources, schemes, etc. A README file, a ChangeLog, a compile script and automatic copy on uC always make a good impression ;-). | ||
| - | Files are uploaded to the wiki using the ** Add Images or other files ** feature. The namespace in which the files are uploaded is of the type **: pm: prj20 ??: c? ** or **: pm: prj20 ??: c?: Student_name ** (if applicable). ** Example: ** Dumitru Alin, 331CC -> **: pm: prj2009: cc: dumitru_alin **. | + | The code : {{:pm:prj2022:avaduva:code.txt|}} |
| - | </note> | + | |
| - | ===== Journal ===== | + | Github version : [[https://github.com/MoadAsehraoui/AM-Project.git]] |
| + | |||
| + | Demo video : [[https://youtu.be/Hnfv7vRd2BI]] | ||
| - | <note type> | ||
| - | You can also have a diary section where the project assistant can track the progress of the project. | ||
| </note> | </note> | ||
| + | |||
| ===== Bibliography / Resources ===== | ===== Bibliography / Resources ===== | ||
| <note> | <note> | ||
| - | List of documents, datasheets, Internet resources used, possibly grouped on ** Software Resources ** and ** Hardware Resources **. | + | [[https://microbit.org/projects/make-it-code-it/step-counter/#:~:text=Like%20the%20Dice%20project%20this,of%20steps%20you've%20taken.]] |
| + | |||
| + | [[https://microbit.org/code/]] | ||
| + | |||
| + | Python Microbit Editor : [[https://python.microbit.org/v/2]] | ||
| </note> | </note> | ||
| <html> <a class="media mediafile mf_pdf" href="?do=export_pdf"> Export to PDF </a> </html> | <html> <a class="media mediafile mf_pdf" href="?do=export_pdf"> Export to PDF </a> </html> | ||