I bought a 0.96”, 128x64, OLED for $7 (price range ~$4-10 based on quantity). It is tiny, the display being about 2.5 cm x 1.25 cm. It is an I2C device that needs 3.3-5V. You connect it to the micro:bit via pins 19 (SCL) & 20 (SDA). Some of the extension boards have grove port connectors (white 4 pin jacks) already set up for this to make it easier to connect (1 cable with 4 wires). There are a couple of options for makecode extensions with different number of blocks. The third seems to be an older version of the first (both by Tinkeracademy). The second, by Author: shaoziyang, gives you more control over what and where {though it does not have a block for drawing diagonal lines}. The first block that has to be used is an “initialize” or “init” block. The default address for the device is 60. I tend to put that in “on start” , but it just has to come before using the other blocks in a “forever” block if you prefer. The next thing that is good to know is that there is a zoom mode which enlarges things to make it easier to read, but also shifts it to 64x32 pixel resolution (zoom=true in the code ; tinkeracademy block set default to this). This means that with zoom=true you have 4 lines of text vs 8, and 12 vs 24 columns of text. You need to know this because you can choose where to start the text. Likewise, if drawing lines or pixels, you have 64 vs 128 for x position and 32 vs 64 for y position in zoom=true mode. Third thing is color. Some of the blocks have a color part and your choices are 0 or 1. Color 1 is “normal”, black screen and yellow or blue (for my device, the first line is yellow text, other 3 are blue in zoom=true mode). Color 0 is inverted, text is black and highlighted in the line color. The obvious use for this is to display sensor or variable data. This can be done easily with the makecode blocks (code). . Here is my setup. The oled is connected to a BitBooster from lectrify in order to access pins 19 & 20. I believe graphing can be done, but you would have to utilize micropython. The same is true for displaying icons/bitmaps. More exploration is needed for this. (possible micropython instructions https://www.littlebird.com.au/a/how-to/81/0-96-oled-screen-with-micro-bit and http://www.suppertime.co.uk/blogmywiki/2019/11/microbit-oled-display/ update You can plot pixels using the blocks in makecode, so you can graph. The hard part is scaling the y values you get to the screen. Create a variable for the x coordinate of the pixel and set it to 0. If we have zoom=true, then we have 64 possible x values, so the repeat loop can repeat 64 times (collect 64 data points)(maybe it can only repeat 63 times???). That also means that we have 32 possible values for y. So you have to scale your input to fit between 0 & 31. With a twist. 0 is up top, 31 is at the bottom. I am doing temperature in Celsius, so I did a simple "31 - rounding of temperature". I rounded because I am not sure if the sensor rounds or does integers and pixels have integer coordinates. If the temp is 22 C, it will color in a pixel at y=9 (towards the top); if the temp is 0 it will color at y=31 (the bottom). My code cannot register temps below 0. Then I change X by one to collect the next data point. I did that every half second. The "clear" command is to erase the last line graphed when i want to graph again. Remember, if you use "zoom=false", you will have 128 x values and 64 y values for coordinates. So repeat goes to 127 (or 128???) and data values need to scale from 0-64, upside down.
0 Comments
MakerX is a Columbus area Maker Exposition. It was February 29 from 10-4 pm at the Ohio Expo Center and they had 68 groups this year showing what they do or have done. It ranges from projects by young kids, to school groups, to hobbyists, to University departments, to startup and established companies. I have been to a few Maker Faire’s in different cities and it was in the middle, sizewise. There were a nice variety of displays. The venue was large enough so there was room to move or stand. Lots of great conversations happened with exhibitors sharing their projects.
There were some battling robots, some AWESOME furniture made by Riverdale students. R2D2 was there, but so was a friend of his.
Some things that I saw there and need to research are digiRacer, a SoapBox Derby project by mimicobots and some craft stick connectors called “nurcs” (they kinda look like knex connectors, but for craft sticks).
The other day I visited the Akron National Inventors Hall of Fame STEM Middle School. Sam Crews was so kind as to take me around, show me the facilities and pop into a few classrooms. They are a 5-8 school of about 400 students that opened in 2009 in a temporary facility. They moved into the NIHF building in 2010 after renovating and adding on classrooms. The 108 new fifth graders get into the school via a lottery, with each area that Akron Public Schools covers getting 12 slots and allowing 12 slots for out of District students. Their core is Problem Based Learning utilizing partnerships with businesses around Akron, Goodyear being one of them. The classrooms have a movable wall between them to aid the cross curricular aspect of PBL. For example, when working on a project, the English and Science classrooms can become one big one so the kids can go to the area they need to work on at the moment and get access to multiple teachers in the same time period.
In addition to classrooms, they have a gym, a stage area, an Invention Incubator for quick prototyping, a library/media area, engineering space, and digital fabrication space. They also have a space for the students teachers from the University of Akron. |
Archives
December 2022
Categories |