Creating mBlock Extensions allows users to write custom blocks for mBlock by creating extensions. There are two main modes for blocks - Scratch Mode which connects to a computer, and Arduino Mode which runs programs on a robot independently. Writing an extension involves defining how blocks appear, generating Arduino code, and programming behavior in Scratch Mode via JavaScript. Extensions are packaged and distributed and can be shared online for others to download and use.
First day of slides for @GAFFTA workshop http://www.gaffta.org/2012/07/24/hacking-the-kinect-with-openframeworks/
Part 1 of the live stream : http://www.youtube.com/watch?v=WXfy8Cuje-0&feature=plcp
Part 2 of the live stream :
http://www.youtube.com/watch?v=I80FsOlMPj8&feature=plcp
Box2D is the world's most ubiquitous 2D physics engine. It's light, robust, efficient and highly portable. It has been battle-proven in many applications on many platforms, and it's open-source and free. Check out the Box2D website athttp://www.box2d.org
First day of slides for @GAFFTA workshop http://www.gaffta.org/2012/07/24/hacking-the-kinect-with-openframeworks/
Part 1 of the live stream : http://www.youtube.com/watch?v=WXfy8Cuje-0&feature=plcp
Part 2 of the live stream :
http://www.youtube.com/watch?v=I80FsOlMPj8&feature=plcp
Box2D is the world's most ubiquitous 2D physics engine. It's light, robust, efficient and highly portable. It has been battle-proven in many applications on many platforms, and it's open-source and free. Check out the Box2D website athttp://www.box2d.org
This article concerns the program VivaVisualCode, showing how to use VivaCore library. VivaVisualCode represents in a graphic form the parse tree of the input source code in C++.
To understand the basic features and functions to create and debug a project in CCS v3.3
To get familar with CCS v3.3
More in-depth explanations of Code Composer Studio’s various features .
Ex: Breakpoints,watch window, single stepping, memory etc..,
Finally, you will able to work with CCS v3.3
Understanding ScratchX Extensions with JavaScriptDarren Adkinson
First of a two part slideshow that starts you off on the road towards building your own software extension blocks for the Scratch programming environment.
Notes: .
- Contains 39 slides.
- Aimed at experienced Scratch users/teachers with the motivation to learn more.
- Scratch is developed by the Lifelong Kindergarten Group at the MIT Media Lab. See http://scratch.mit.edu
- Please check back for occasional updates/errata.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
This article concerns the program VivaVisualCode, showing how to use VivaCore library. VivaVisualCode represents in a graphic form the parse tree of the input source code in C++.
To understand the basic features and functions to create and debug a project in CCS v3.3
To get familar with CCS v3.3
More in-depth explanations of Code Composer Studio’s various features .
Ex: Breakpoints,watch window, single stepping, memory etc..,
Finally, you will able to work with CCS v3.3
Understanding ScratchX Extensions with JavaScriptDarren Adkinson
First of a two part slideshow that starts you off on the road towards building your own software extension blocks for the Scratch programming environment.
Notes: .
- Contains 39 slides.
- Aimed at experienced Scratch users/teachers with the motivation to learn more.
- Scratch is developed by the Lifelong Kindergarten Group at the MIT Media Lab. See http://scratch.mit.edu
- Please check back for occasional updates/errata.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Embracing GenAI - A Strategic ImperativePeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
2. 2
Creating mBlock Extensions
How Extensions Work
Extensions allow custom blocks for mBlock. You can use
extensions to support third-party Arduino sensors or
other robotic products such as Lego or LittleBits.
Anybody can write extensions for mBlock. This makes
mBlock an awesome platform for every types of
hardware-related programming.
Every block in mBlock has two modes: Scratch Mode
and Arduino Mode. It’s important to know their
difference before writing extensions.
Scratch Mode and Arduino Mode
> Scratch Mode
In Scratch Mode, the
robot or Arduino board
must be connect to
the computer in order
to run the program. You
can use Scratch blocks to
create graphics or make
games.
- Arduino Mode
In Arduino Mode, the
program is uploaded
into the robot and the
robot is run on its own.
However, you cannot use
graphics from Scratch
since the computer is no
longer there.
use Edit/Arduino Mode menu item to
toggle between Scratch and Arduino
modes
this “Say” block can only be used in
the Scratch mode; while the “(Repeat)
Forever” block can be accessed in
both modes.
3. Creating mBlock Extensions 3
Using the Extension Manager, you can browse
extensions, find one you want, and get the blocks
included in the extension with a single click.
The following instructions shows how to add an
extension to mBlock.
Using an Extension
Use the menu item “Extensions”, “Manage
Extensions” to open up the Extension
Manager.
You may search for extensions with the
search box. Click “Download” at the right of
the table item to download the extension.
Internet connection is required.
The extension you downloaded will show up
in the “Robots” group of mBlock.
1
2
3
Extensions you can
download from the Internet
Extensions installed in this computer. You may
upgrade or remove those extensions
Read more information from
the author’s webpage
Click here to
download
Install an
extension from
a zip file in your
computer
These blocks come from
the “Demo” extension I
just downloaded
4. Creating mBlock Extensions 4
Writing an extension is not as hard as it seems. Mostly it
is done by editing some text files. Arduino knowledge
is required in implementing the Arduino Mode, while
Javascript is used in the Scratch Mode. You may skip one
of the modes, and the block will simply not work in that
mode.
Here’s a list of things extension writers need to do:
• Write basic information, such as the name and author
• Define how the blocks look like
• Tell mBlock how to generate the Arduino code
• Write the functions run in the Scratch mode
• Include additional Arduino header / C files.
Writing an Extension
Every extension is a .zip file compressed from a folder.
Here is the folder of the “Demo” extension when
unzipped:
The File Structure of an Extension
.s2e file: basic description, blocks
definition of the extension, and the
Arduino code generated by the
extension in the Arduino Mode. “s2e”
stands for “Scratch 2 extension” files
“src” folder is for additional files
included in the Arduino mode. You
may skip this if you don’t use additional
libraries
Javascript code that run on the
Scratch Mode stays in the “js”
folder
Source code of existing extensions are always the best resource
in writing extensions. In mBlock, you can always view the source
code of existing extensions through the Extension Manager.
“View Source” will bring up a window of that extension’s folder.
You may try to change the extension code and it will take effect in
the next time mBlock is launched (this is one way of debugging).
However, any changes made here will be discarded when
upgrading mBlock or running the “clear cache” command.
Tips
Click here to view the source
code of any existing extension.
5. Creating mBlock Extensions 5
Download the “Demo” extension as a starting point at:
http://www.mblock.cc/site-images/Demo.zip
The next step is editing the s2e file. You need a text
editor. the Notepad program is fine, but I recommend
editors dedicated for code editing, such as Github
Atom, Visual Studio Code, Brackets, or Sublime text.
At the beginning of the .s2e file lies some basic
information. You need to tell the user what does the
extension do and who wrote it. Here is the starting lines
of demo.s2e:
Filling out Basic Information
1
name your extension
the purpose of the extension.
It shows up in the extension
manager
version number, in forms
of x.y.z. It is used in
updating the extension
your name, and email
address
Basic information
Block definition
Menu definition
How menu items are
transformed into numerical
values in the Arduino Mode
Translations
A web page to read more
about the extension Location of the Javascript
file for Scratch mode
The order of the extension when
show up with multiple extensions
“firmware” and
“extensionPort” are not
used, just leave it be
Tips
the .s2e file is the main file of the extension. Aside from the basic
information, it defines blocks, tells mBlock how the dropdown
menus look like, and how to translate the extension to another
language (if you want to).
If you are familiar with Javascript, you may notice it is written in a
plain JSON (JavaScript Object Notation) object.
6. Creating mBlock Extensions 6
Defining Blocks
2
the “blockSpecs” section tells mBlock how blocks look
like, and gives clues on how they behave in Scratch and
Arduino mode.
Every block is described
in a Javascript Array form
/ Block Types are indicated by a single letter:
/ The text that appears on the blocks
words begin with “%” are parameters - “slots” that users can fill up by typing or with
other blocks. This block (“digitalWrite( %n , %d.digital )”) looks like:
Other parameter types include:
“h” stands for “header blocks”; they are rarely used in
custom extensions.
“w” stands for “write blocks”; they send commands to
the hardware and do not expect a response.
%n gives a round slot for numbers, and will
give a number in the Arduino Mode.
%d.name gives a round dropdown box, and will give a
number in the Arduino Mode. The dropdown’s content is
defined in the “menus” section and identified by name.
%s gives a rectangular hole for
strings
%m.name gives a rectangular
dropdown box for strings
%c gives a color picker
“r” is for “reading blocks”; in Scratch Mode, it waits
the function to return a value; “R” is for asynchronous
reading - the value is not returned by the function but
told later (“callback”) through a function in Javascript.
“r” and “R” looks the same and have no difference in
the Arduino mode.
“b” is for “binary blocks”; they return a binary yes-or-
no value. Similarly, “B” is for asynchronous reading of
binary values
7. Creating mBlock Extensions 7
Making Menus
Finishing Up the Block Definition
3
4
the “digitalWrite” block has a convenient menu for
selecting HIGH or LOW output. It is defined in the
following way:
“%d.digital” means menu information is stored in the
“digital” list of the menus section
give a Javascript function name
to use in the Scratch Mode
this means the menu has two options:
“HIGH” and “LOW”
give default values to the
block you just defined
in Arduino mode, “HIGH” generates a
value of 1 and “LOW” generates 0. This
does not affect the Scratch Mode.
8. Creating mBlock Extensions 8
Arduino Code Generation
5
When defining each block, .s2e file also decides how
Arduino code is generated, following rules below:
insert include
statements
define variables
insert once in the
setup() function
insert once in the
loop() function
if you included other source
files, be sure to copy them to
the “src” folder
can appear many times
when the block is used
{0} means the first
parameter, “9” in this case
9. Creating mBlock Extensions 9
Coding Scratch Mode
6
The Javascript file is pretty long. I recommend take the
demo.js and only make necessary changes. If your extension
does not support Scratch Mode, skip this part.
define your own variables here
setup code for the extension
file name
must match
send bytes via the serial ports
using an array of bytes
this is called every time the computer
receives bytes from serial ports
write code for your
blocks here
demo.s2e
demo.js
(at the end of) demo.js
demo.s2e
don’t change
trace(string) function is really useful for
debugging because it produces logs in the
Arduino Mode panel.
change this to the name of your extension.
function name
defined here
10. Creating mBlock Extensions 10
After you are satisfied with the extension, zip it into a
.zip file. In MacOS, right click the folder and choose
“Compress xxx...”; in Windows, right click the folder
and choose “Send To”, “Compressed (zipped) folder”.
Then you may import the extension through the “Add
Extension” button in the Extension Manager. But It’ll be
easier for the users if the extension is uploaded to the
Online Extension Center.
Publishing Your Extension
Go to the extension center website:
http://www.mblock.cc/extensions/
And click “Sign-in with Github”. If you don’t have Github
account, you need to register one.
After Signing in, drag your .zip file to the large box (or
click the large box to choose with a file browser)
Sign in with your Github account
Congratulations! You’ve uploaded an extension and
contributed to the world mBlock community!
Upload your extension
1
2
Click here to
sign-in
Drag your .zip
file here
If you want to update your extension, simply upload a .zip file with
a higher version number. And you’re all set.
Makeblock, the company maintaining mBlock, reserves every right
to remove an extension, with or without explanation. But we do
welcome extensions of every kind from every product and hope
we only moderate spam (like one with the name “test123”) and
those with improper content. Simply use your common sense.
Tips
Tips