Browsing Tag

Codebug

Random dice example for a codebug

A random dice example for a codebug Code Python # To run this code on CodeBug, visit: # # http://www.codebug.org.uk/learn/activity/66/tethering-codebug-with-python/#step585 # import codebug_tether from codebug_tether import (IO_DIGITAL_OUTPUT, IO_DIGITAL_INPUT, IO_PWM_OUTPUT, IO_ANALOG_INPUT) import random from codebug_tether.sprites import Sprite random_number = None codebug = codebug_tether.CodeBug() codebug.set_leg_io(0, IO_DIGITAL_INPUT); codebug.set_leg_io(1, IO_DIGITAL_INPUT); codebug.set_leg_io(2,…

Scrolling text on a Codebug

In this example we will display some of the scrolling text examples on a  codebug, these are easy to create Code Python # To run this code on CodeBug, visit: # # http://www.codebug.org.uk/learn/activity/66/tethering-codebug-with-python/#step585 # import codebug_tether from codebug_tether import (IO_DIGITAL_OUTPUT, IO_DIGITAL_INPUT, IO_PWM_OUTPUT, IO_ANALOG_INPUT) from codebug_tether.sprites import StringSprite codebug = codebug_tether.CodeBug() codebug.set_leg_io(0, IO_DIGITAL_INPUT); codebug.set_leg_io(1, IO_DIGITAL_INPUT);…

Happy or Sad face on Codebug

Lets press a button and then display a happy face with button A pressed and a sad face if button B is pressed Code Python Code # To run this code on CodeBug, visit: # # http://www.codebug.org.uk/learn/activity/66/tethering-codebug-with-python/#step585 # import codebug_tether from codebug_tether import (IO_DIGITAL_OUTPUT, IO_DIGITAL_INPUT, IO_PWM_OUTPUT, IO_ANALOG_INPUT) from codebug_tether.sprites import Sprite display = None display_1 = None codebug = codebug_tether.CodeBug() codebug.set_leg_io(0, IO_DIGITAL_INPUT);…

Magic 8 ball on a Codebug example

This is magic 8 ball running on a codebug CodeBug™ is a fun, engaging, entry level introduction to simple programming and electronic concepts to anyone, at any age. It is easy to program using the online interface, which features colourful drag and drop blocks, an in-browser emulator and engaging community features. It enables you to create your own games, clothes, robots or whatever other inventions you have in mind. Plugs onto Raspberry Pi GPIO as an add-on StGITAdpo ine foI ints.nme o TnlugdevicbleVersatimplI/O);…
a .sih2 id="sideban-prima-="sidebit" class="sidebitm roletocomplemeima"l" aria-labelP-primarS"sidebrS"sidebon" itemscope="itemscope" itemtype="https://schema.orWPS"siBahor">
C/categiesug<4> C/categiesug opuctio" valu'-1'>S}sele C/categy opuctiol classy lev-0it" value198">3d P printi opuctiol classy lev-0it" value20">555 etTiwersopuctir"> opuctiol classy lev-0it" value68">Ahenoid Appersopuctir"> opuctiol classy lev-0it" value61no">Arduinoopuctir"> opuctiol classy lev-0it" value36io">Audioopuctir"> opuctiol classy lev-0it" value14cs">Basicsopuctir"> opuctiol classy lev-0it" value1-156a Codebcsopuctir"> opuctiol classy lev-0it" value28">D displicsopuctir"> opuctiol classy lev-0it" value14266">E32csopuctir"> opuctiol classy lev-0it" value9566">ESP8266opuctir"> opuctiol classy lev-0it" value14966"r.srduinoopuctir"> opuctiol classy lev-0it" value-381">Hardwareopuctir"> opuctiol classy lev-0it" value204csH some Aoormationopuctir"> opuctiol classy lev-0it" value58on">Informationopuctir"> opuctiol classy lev-0it" value160">Mic, r Kitopuctir"> opuctiol classy lev-0it" value19es">Power Suppliesopuctir"> opuctiol classy lev-0it" value1-382Proobjeiesopuctir"> opuctiol classy lev-0it" value64pi">Raspberry PIopuctir"> opuctiol classy lev-0it" value13">S/schematiPIopuctir"> opuctiol classy lev-0it" value97">Sensowersopuctir"> opuctiol classy lev-0it" value32ts">Test Circuitsopuctir"> opuctiol classy lev-0it" value5566T-tra liowersopuctir"> opuctiol classy lev-0it" value2ls">Tutorialsopuctir" 0 t) d drdr o.s.parentNodh-subm(); } } d drdr o.onc Chaew= onC/c/ Chae; })(); /* ]]> */};
tr! (functioe,t,n,o,i,r){ functioa(){r("e scro",a),r("mouseecov",a),r("touchs StG",a,{stpaive:!0}),s()} functios(t){ or(o=eng.getElementsByTagNam, "script[t=0], pre_js=d;n[t];)d(n[t++]);n=[]} functiod(t,n){eng.getElemeById(t)||(n=end.createElemen, "script,n;a.srn.v it,n;a.asyn!0,o s.parentNode.insertBeforn,o))} pre_js=cdn.pu.tabi(n),i=tic.aEinveL li"gen,r=ent.mecoEinveL li"gen,i&&=="complet!==ent.readySta?(i("reloa, (functio {('setTimeoua,5500)}),i("e scro",a),i("mousemeco",a),i("touchs StG",a)):s()} }(documenw wind,[]"))}catch(e){console.log(e)} pre_js("/nu/paad2us.goog.asdplicatiam.cou/paadts/jadsbys.googljs")"};d/div>
R_rece P-posug<4> A aooke, at 2.4G W-retess Swicat 6// Chpane R.mesi T-tramtwitt R_reicov M modu > U usine youAlexa – C/letandu, ttTiwe, alarmeon and t n. s-n ="dturbty featu > Thone co/sectime oalexa commn as s.pe 1 > A Fewon St Wndu m mev "siasne fo3and printi >
d/div>
d/div>
a .sih2 id="sideban-seconda-="sidebit" class="sidebitm roletocomplemeima"l" aria-labelS-secondarS"sidebrS"sidebon" itemscope="itemscope" itemtype="https://schema.orWPS"siBahor">
fooGen 2 id="sitfooGenit" class="sitfooGeniiv>
>
a .sih2 id="sidebafooGen-1it" class="sidebitm roletocomplemeima"l" aria-labelFooGen - C-colu 1rS"sidebon" itemscope="itemscope" itemtype="https://schema.orWPS"siBahor">
ByTsug<51"
7805 Alexa ahenoid appersA>Arduino">Aud examifiennop blocnoa Codebcs">E32csespsp82cs"r.srduinoFreearduinoLDRnoLM317noLomag Probenomic, :b Kitphotocellit">Raspberry PITiteener-puPIWemocit a .sili> >
a .sih2 id="sidebafooGen-282" class="sidebitm roletocomplemeima"l" aria-labelFooGen - C-colu 2rS"sidebon" itemscope="itemscope" itemtype="https://schema.orWPS"siBahor">
Subscpucti-382" class w.widgetainvein-icow.widgetainig-titlfooGen-w.widglfooGen-r-colum2 w.widg w.widg_m-bl_s>Subscpucti jetpack_s>Subscpucti_w.widgng"h52" classw.widget-heading">">Subscriou tB-bloviaor Emaug<51{; Subscriem-blom-bl_s>Subscpucti-38r">
Subscrieh"tex>

Eountee youe Emaan a presn to>Subscriou tn thim-blon ant_reico s-nifilicatisme oa net-posed be Ema.u.

Subscriee Ema"1{; Subscrier-labe{; " class=.screen-reader-te"{; e fid=>Subscrieh-fieom-bl_s>Subscpucti-38r"> r Ema A a pressssssssssssssssssssssssmeSubscrieh-fieom-bl_s>Subscpucti-38{; placeholderr Ema A a pre8{; /elssssssssssssssssssssu.Subscriet-submit"ssssssssssssssssssssssssu Subscri"/elssssssssssssssssssssssssu Subscpucti-38""/> ssssssssssssssssssssssssuf buttot type="submi ssssssssssssssssssssssss ssssssssssssssssssss ssssssssssssssssssssssss" namejetpack_s>Subscpuctis_w.widgn ssssssssssssssssssss> ssssssssssssssssssssssss">Subscrioooooooooooooooooooooooo / a .sili> >
a .sih2 id="sidebafooGen-382" class="sidebitm roletocomplemeima"l" aria-labelFooGen - C-colu 3rS"sidebon" itemscope="itemscope" itemtype="https://schema.orWPS"siBahor">
"hdware<51
fooGeniv> >">