Showing posts with label blockly. Show all posts
Showing posts with label blockly. Show all posts

Sunday 14 March 2021

Initial experiments with Code Bug Connect




Code Bug has been around for a while, and it is incredibly cute, When it first came, it was a very interesting piece of kit - and it is still is and fun to play with. It spec means it is still a very useful piece of kit.

  • 5x5 Red LED display
  • 2 buttons
  • 6 touch sensitive I/O pads (4 input/output, power and ground)
  • Micro USB socket
  • CR2032 battery holder
  • Expansion port for I2C, SPI and UART
  • Blockly-based online programming interface
  • CodeBug emulator for checking code before downloading

In 2020 Code Bug launched and successfully funded a Kickstarter campaign (https://www.kickstarter.com/projects/codebug/codebug-connect-cute-colourful-and-programmable-iot-wearable ) for a new version the Code Bug - CodeBug Connect with a serious upgrade.(and the name Connect is highly appropriate with USB tethering and Wifi capability in this version. The technical specification (taken from their site https://www.kickstarter.com/projects/codebug/codebug-connect-cute-colourful-and-programmable-iot-wearable ) shows how much of an upgrade this is:

  • 5x5 RGB LEDs with dedicated hardware driver/buffer
  • Two 5 way navigation joysticks
  • Onboard Accelerometer
  • 4 GPIO legs, including high impedance sensing for detecting touch (think  MaKey MaKey TM)
  • 6 Sewable/croc-clip-able loops. 4 I/O including analogue 1 power and ground
  • 6 pin GPIO 0.1" header (configurable for UART/I2C/SPI, I2S or analogue audio out)
  • QuadCore -- four heterogeneous processors
  • 4MB Flash Storage
  • 2.4GHz WiFi 802.11 b/n/g, Station and Soft AP (simultaneous)
  • Experimental long range wireless 0.8km to another CodeBug Connect
  • UART terminal access over USB
  • High efficiency SMPS Boost convertor for battery (JST PH connector)
  • High efficiency SMPS Buck convertor from 5V USB


Recently the early version of the Connects have been arriving and it is cool (IMHO). 


The getting going guide  https://cbc.docs.codebug.org.uk/gettingstarted/quickstart.html lives it up to its name and does a better explanation of doing this than I can provide here.



First I played with the USB and the blockly style programming tool https://www.codebug.org.uk/newide/ (see above) essentially producing a very slightly modified version of their starter code. You can perhaps see the Python style coming in with the while True coming in. Works well and it showed one of the different between this version and the older one; the LEDs are now colourful instead of red only. Programming it, while using the laptops USB to power it does lead to pulling the cable in and out to get the code to run - but that is fine and is clearly explained in the guide

You can connect it via wifi to a phone or a laptop so tried it with a phone. The getting started guide explains it well and the online editor allows you to program in micropython and example is shown below


import cbc

from color import Color

import time


while True:

  cbc.display.scroll_text(str(" Bug 1"), fg=Color('#f0ff20'))

  time.sleep(1)

 


They have even thought about security. I set my system to connect via wifi through my phone; but when I want to connect through my laptop I had to go through  the adoption process to try it on my phone and a laptop - sounds scary but it is well explained in the getting going guide and is relatively simple to do.


Looking forward to exploring the device a lot more, the guide also includes a number of code examples to play with and explore. A feature I particularly liked was seeing the block code rendered as python when using the editor on the phone.



All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with. Twitter @scottturneruon

Sunday 20 March 2016

Playing with Ozobot Bit and Blockly

Previously I discussed the older Ozobot that were programmed by colours on paper or made to dance via an App. The newer Ozobot Bit still can be used in these ways but also can be programmed using a Blockly web-based interface at http://ozoblockly.com/editor, so are now programmable on tablets, but also PC, Macs, essentially anything that can run the webpage.



First stage is the calibration of the 'bot'
1. Hold the power button on the ozobot until it starts flashing with a white light.
2. Move to the white space that is similar to the bottom of the Ozobot, the wheels might start moving but as you get closer to the space they should stop.
3. The Ozobot should start flashing green - that is ok continue holding the ozobot to the screen until it stops flashing green - if it flashes red start again.





Build your code blocks and when you are ready press the power button on the Ozobot. Hold the ozobot against the white space again and holding it there press the load button. The white space should now be flashing different colours, but the ozobot should be flashing green programming the ozobot.



Now to run them press the power button twice. I have add a two second delay in the code so I can get my hands out of the way before they start moving. The video below shows two of them so through this routine twice
- 2 second delay;
- Zigzag a little
- Flash the lights through the rainbow colours;
- Move in an arc;
- Flash the lights a bit like fireworks going off



It is relatively easy to program these and fun, but you may have to hold the Ozobot to the screen for a while if you use a Mac or PC. They are cute and the flashing LEDs offers some interesting effects like the 'fireworks'.


All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with.

Thursday 17 March 2016

ozobot - cute, fun and colour-mad

I have had these for a while, a couple of Ozobots. Small little robots that react to colours on the ground. Below are figures showing the Ozobots working with an App Ozogroove which allows the bots to perform dance routines, and out of the box, they are set up to run around a track that has coloured blocks causing the bots to change what they do.
figure 1.
 Interesting thing about these is the way a routine is transferred from the App to the bot. - by flashing light. In figure 1 the two ozobots are mid way through being programmed with a dance routine. Figure 2 shows one of the bots during the dance.


figure 2
The latest version these, Ozobot Bit 2.0 can be programmed via Blockly-based website with light being used to transfer the routine. I had a play with one a couple of days ago, liked it so much I order a pair from Amazon!

As an aside, when I first saw the light transfer method it reminded me of some of the early British TV programmes on Computing in the 1980s, who used a system where a flashing cursor on the screen was used to send data to be recorded on cassette or into the computer.

I would be interested in finding out what else has or can be done with these interesting little robots. If you have any ideas or experience with them please free to add comments.



All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with.

Sunday 23 August 2015

When is a bug not buggy - CodeBug

When it is a Codebug - a board with 5x5 LED matrix and 4 connectors that can be either inputs or outputs. 





Programming is through a Blockly interface (as above). Code can be tested using the simulator on the left, before downloading to the CodeBug. The site contains a excellent video showing all the steps (see http://www.codebug.co.uk/gettingstarted/ ).





Codebug, Experimenter Kit CODEBUG-EXPKIT at the moment is usually programmed on-line. There is though a Scratch version in development by  Cymplecy (SimpleSi) http://simplesi.net/scratchcodebug-beta-testing/ that is an potential option for off-line programming. It is currently at the Beta testing stage but is good fun to play with.


What is nice about Codebug and, in fact, most of the Physical Computing device coming out that the moment is the developing community. There is a lot of sharing of projects, ideas and solutions to problems being provide to others through the site (and via Twitter)

I like the Codebug it is a small, relatively inexpensive device (or will be when it comes on the market- most of the ones out there at the moment are in the hands of those who contributed to the Kickstarter funding). The site (http://www.codebug.co.uk/) is full of useful links, examples and ideas.


All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with.

Thursday 16 July 2015

cutest computational thinking in the world?

Wonder Workshop (https://www.makewonder.com/) produce the  robots Dash and Dot robots (see picture above). It is hard not to be charmed by these robots, they are cute, easy to use, download the Apps and you are ready to go almost out of the box - and add to this an easy to use but fairly powerful tool for developing programming.


At the time of writing the software is only available for IOS but there are plans for Android. 

Blockly, available as one of apps, can be used to program the robots. It is a simple looking graphical language (simpler looking but similar to Scratch). A simple example (shown opposite) where Dash (the bigger of the two) does things such as  moves forward,  going left, lights change to orange, , left ear changes colour, head moves forward and it roars like a dinosaur. It relatively easy to then add loops and test (such as checking if it's 'friend' Dot is in view). Below is a very short video of Dash moving around until it 'sees' Dot.





It is difficult not to anthropomorphise these, especially when they are left alone they try and attract your attention with noises. They are just fun as well.

Recently, other developers have been producing alternative programming approaches. The Tickle App (https://tickleapp.com/en-us/) has added these robots to their supported devices.





All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with.

ChatGPT, Data Scientist - fitting it a bit

This is a second post about using ChatGPT to do some data analysis. In the first looked at using it to some basic statistics  https://robots...