Sending Data to another M:B for data capture

Oct 20, 2020 at 8:49 PM by Kyle Pindar

Hi

So i'm trying to utilize the send/receive function.  Have just tried to re-use the compass code we just created in class to send the data as the wind changes in direction and therefore the compass reading changes.  Do I enter the send radio data after each if statement, or is there some way I can simply enter it once?  Have attached the code in reference.  Compass Reader

Thanks!

3 Replies

Andrew McDonald
Oct 21, 2020 at 8:31 AM

Good morning, 

Such a fun project!!  I did a re-mix of it so that you will have two micro:bits with different code - the sender and receiver code. 

Sender - https://makecode.microbit.org/_iFXAPeijoPFs

Receiver - https://makecode.microbit.org/_1ku92Hf1RhLr

The sender code just sends over the compass heading and then the receiver code will display the direction of the sender compass. 

Hope that helps! let me know if you want me to better explain the code or anything.

Kyle Pindar
Oct 21, 2020 at 9:02 AM

Thanks!  Wasn't sure if I had to recreate the radio coding line for each "if", but now that I see it that wouldn't make sense!!  Thanks!

Kyle Pindar
Nov 2, 2020 at 8:00 PM

So I've got it going now, but I can't seem to get the live data feed where I can see the graph and/or download the data?  I'm hoping that we can capture data and put into G Sheets to analyze now that we've built some databases and learned our way around Sheets.  Any advice?

Greg Ryerson
Oct 28, 2020 at 11:36 AM

If you use the multi-window editor, you'll also be able to work with both sets of code on the same device, which may make the editing process a bit quicker.

Andrew McDonald
Oct 30, 2020 at 8:28 AM

You bet - here is a nice getting started video..... 

This channel has some great resources!! https://youtu.be/RI_w0raqFwM

Barb Seaton
Oct 30, 2020 at 10:36 AM

Yep - link to the duel screen editor here

Kyle Pindar
Oct 31, 2020 at 6:19 AM

Thank you!  Very helpful!