Section 2.4 - Thermometer: Only works when connected to computer.
I just started doing some of the PB examples in the e-book. I did section 2.4 (thermometer), even modified it to display degrees F instead of C. Works fine while connected to my iMac and using the MicroBlocks program (not using web version). The problem is when I disconnect the micro USB cable from my computer and plug it into a USB power adapter. The program does not run (nothing displays on OLED). The red power LED lights up and stays on, the green LED turns on only for about 1 second.
Before unplugging the USB cable, I click on the STOP button in MicroBlocks program. Then I click on the USB tool/button and choose DISCONNECT. Maybe there is some other instructions that need to be followed to run the PB board on an external USB power supply?
I think I'll try one of the simpler LED sample programs and see if that works when I switch to external power...
Sample 2.1 - the flashing LED works fine when board is plugged into external USB power supply. So there's some issue with the OLED not working in a standalone mode...0
There is a delay issue with the initialization of the temp/humidity sensor. It's fixed when using the web, but must not be updated on the download yet. Add in extra wait blocks like in the image.
For more info, check out Turgut's post on Nov 4 in the 'Temperature sensor not working' thread.1
This was fixed in the latest Pilot version 1.1.84-pilot of MicroBlocks released on November 7th.
You can get that here https://microblocks.fun/downloads/pilot/0
Before seeing these, replies I had thought I would try adding a delay at start of my code. Adding a short 1 sec delay did the trick :)0
Is there a more efficient way to do my degrees C to F conversion? Formula is TempF = (TempC * 1.8) + 32. I found I could only use whole numbers, so handled the 1.8 multiplier in two steps. Could the conversion all be done in one line/block?0
You can nest blocks.1
You can get that here https://microblocks.fun/downloads/pilot/
Just looked at the above link: the standalone subfolder lists some linux and Win files dated 11/12 (today). Where would I find the standalone file for MacOS?
You should use this file https://microblocks.fun/downloads/pilot/packages/MicroBlocks.app.zip as far as I know. I don't have a Mac so can not help you with that.0
For newbies that want to see the temp in degrees F, my streamlined code (thanks Peter) looks like below. Note - you do have to create the variable TempF in MicroBlocks by going to Variables->[Add a variable] ...1
You don't even need a variable to make it work 😉1
True, but I wanted to test creating variables. Could come in handy to have the temp saved as a variable. Anyways, good to know :)1
- 96 All Categories
- 3 Community
- 3 Hello Maker!
- 83 PicoBricks - Make, Run, Split, Merge
- 26 Hardware Support
- 14 PicoBricks Backers Hub
- 41 MicroBlocks Support
- 2 Shipping Support
- 10 Products & Technology
- Raspberry Pi
- 10 Other