+
+ Read the Docs
+ v: ${config.versions.current.slug}
+
+
+
+
+ ${renderLanguages(config)}
+ ${renderVersions(config)}
+ ${renderDownloads(config)}
+
+ On Read the Docs
+
+ Project Home
+
+
+ Builds
+
+
+ Downloads
+
+
+
+ Search
+
+
+
+
+
+
+ Hosted by Read the Docs
+
+
+
+ `;
+
+ // Inject the generated flyout into the body HTML element.
+ document.body.insertAdjacentHTML("beforeend", flyout);
+
+ // Trigger the Read the Docs Addons Search modal when clicking on the "Search docs" input from inside the flyout.
+ document
+ .querySelector("#flyout-search-form")
+ .addEventListener("focusin", () => {
+ const event = new CustomEvent("readthedocs-search-show");
+ document.dispatchEvent(event);
+ });
+ })
+}
+
+if (themeLanguageSelector || themeVersionSelector) {
+ function onSelectorSwitch(event) {
+ const option = event.target.selectedIndex;
+ const item = event.target.options[option];
+ window.location.href = item.dataset.url;
+ }
+
+ document.addEventListener("readthedocs-addons-data-ready", function (event) {
+ const config = event.detail.data();
+
+ const versionSwitch = document.querySelector(
+ "div.switch-menus > div.version-switch",
+ );
+ if (themeVersionSelector) {
+ let versions = config.versions.active;
+ if (config.versions.current.hidden || config.versions.current.type === "external") {
+ versions.unshift(config.versions.current);
+ }
+ const versionSelect = `
+
+ ${versions
+ .map(
+ (version) => `
+
+ ${version.slug}
+ `,
+ )
+ .join("\n")}
+
+ `;
+
+ versionSwitch.innerHTML = versionSelect;
+ versionSwitch.firstElementChild.addEventListener("change", onSelectorSwitch);
+ }
+
+ const languageSwitch = document.querySelector(
+ "div.switch-menus > div.language-switch",
+ );
+
+ if (themeLanguageSelector) {
+ if (config.projects.translations.length) {
+ // Add the current language to the options on the selector
+ let languages = config.projects.translations.concat(
+ config.projects.current,
+ );
+ languages = languages.sort((a, b) =>
+ a.language.name.localeCompare(b.language.name),
+ );
+
+ const languageSelect = `
+
+ ${languages
+ .map(
+ (language) => `
+
+ ${language.language.name}
+ `,
+ )
+ .join("\n")}
+
+ `;
+
+ languageSwitch.innerHTML = languageSelect;
+ languageSwitch.firstElementChild.addEventListener("change", onSelectorSwitch);
+ }
+ else {
+ languageSwitch.remove();
+ }
+ }
+ });
+}
+
+document.addEventListener("readthedocs-addons-data-ready", function (event) {
+ // Trigger the Read the Docs Addons Search modal when clicking on "Search docs" input from the topnav.
+ document
+ .querySelector("[role='search'] input")
+ .addEventListener("focusin", () => {
+ const event = new CustomEvent("readthedocs-search-show");
+ document.dispatchEvent(event);
+ });
+});
\ No newline at end of file
diff --git a/_static/language_data.js b/_static/language_data.js
new file mode 100644
index 0000000..c7fe6c6
--- /dev/null
+++ b/_static/language_data.js
@@ -0,0 +1,192 @@
+/*
+ * This script contains the language-specific data used by searchtools.js,
+ * namely the list of stopwords, stemmer, scorer and splitter.
+ */
+
+var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"];
+
+
+/* Non-minified version is copied as a separate JS file, if available */
+
+/**
+ * Porter Stemmer
+ */
+var Stemmer = function() {
+
+ var step2list = {
+ ational: 'ate',
+ tional: 'tion',
+ enci: 'ence',
+ anci: 'ance',
+ izer: 'ize',
+ bli: 'ble',
+ alli: 'al',
+ entli: 'ent',
+ eli: 'e',
+ ousli: 'ous',
+ ization: 'ize',
+ ation: 'ate',
+ ator: 'ate',
+ alism: 'al',
+ iveness: 'ive',
+ fulness: 'ful',
+ ousness: 'ous',
+ aliti: 'al',
+ iviti: 'ive',
+ biliti: 'ble',
+ logi: 'log'
+ };
+
+ var step3list = {
+ icate: 'ic',
+ ative: '',
+ alize: 'al',
+ iciti: 'ic',
+ ical: 'ic',
+ ful: '',
+ ness: ''
+ };
+
+ var c = "[^aeiou]"; // consonant
+ var v = "[aeiouy]"; // vowel
+ var C = c + "[^aeiouy]*"; // consonant sequence
+ var V = v + "[aeiou]*"; // vowel sequence
+
+ var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
+ var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
+ var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
+ var s_v = "^(" + C + ")?" + v; // vowel in stem
+
+ this.stemWord = function (w) {
+ var stem;
+ var suffix;
+ var firstch;
+ var origword = w;
+
+ if (w.length < 3)
+ return w;
+
+ var re;
+ var re2;
+ var re3;
+ var re4;
+
+ firstch = w.substr(0,1);
+ if (firstch == "y")
+ w = firstch.toUpperCase() + w.substr(1);
+
+ // Step 1a
+ re = /^(.+?)(ss|i)es$/;
+ re2 = /^(.+?)([^s])s$/;
+
+ if (re.test(w))
+ w = w.replace(re,"$1$2");
+ else if (re2.test(w))
+ w = w.replace(re2,"$1$2");
+
+ // Step 1b
+ re = /^(.+?)eed$/;
+ re2 = /^(.+?)(ed|ing)$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ re = new RegExp(mgr0);
+ if (re.test(fp[1])) {
+ re = /.$/;
+ w = w.replace(re,"");
+ }
+ }
+ else if (re2.test(w)) {
+ var fp = re2.exec(w);
+ stem = fp[1];
+ re2 = new RegExp(s_v);
+ if (re2.test(stem)) {
+ w = stem;
+ re2 = /(at|bl|iz)$/;
+ re3 = new RegExp("([^aeiouylsz])\\1$");
+ re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+ if (re2.test(w))
+ w = w + "e";
+ else if (re3.test(w)) {
+ re = /.$/;
+ w = w.replace(re,"");
+ }
+ else if (re4.test(w))
+ w = w + "e";
+ }
+ }
+
+ // Step 1c
+ re = /^(.+?)y$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ re = new RegExp(s_v);
+ if (re.test(stem))
+ w = stem + "i";
+ }
+
+ // Step 2
+ re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ suffix = fp[2];
+ re = new RegExp(mgr0);
+ if (re.test(stem))
+ w = stem + step2list[suffix];
+ }
+
+ // Step 3
+ re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ suffix = fp[2];
+ re = new RegExp(mgr0);
+ if (re.test(stem))
+ w = stem + step3list[suffix];
+ }
+
+ // Step 4
+ re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
+ re2 = /^(.+?)(s|t)(ion)$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ re = new RegExp(mgr1);
+ if (re.test(stem))
+ w = stem;
+ }
+ else if (re2.test(w)) {
+ var fp = re2.exec(w);
+ stem = fp[1] + fp[2];
+ re2 = new RegExp(mgr1);
+ if (re2.test(stem))
+ w = stem;
+ }
+
+ // Step 5
+ re = /^(.+?)e$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ re = new RegExp(mgr1);
+ re2 = new RegExp(meq1);
+ re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+ if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
+ w = stem;
+ }
+ re = /ll$/;
+ re2 = new RegExp(mgr1);
+ if (re.test(w) && re2.test(w)) {
+ re = /.$/;
+ w = w.replace(re,"");
+ }
+
+ // and turn initial Y back to y
+ if (firstch == "y")
+ w = firstch.toLowerCase() + w.substr(1);
+ return w;
+ }
+}
+
diff --git a/_static/minus.png b/_static/minus.png
new file mode 100644
index 0000000..d96755f
Binary files /dev/null and b/_static/minus.png differ
diff --git a/_static/plus.png b/_static/plus.png
new file mode 100644
index 0000000..7107cec
Binary files /dev/null and b/_static/plus.png differ
diff --git a/_static/pygments.css b/_static/pygments.css
new file mode 100644
index 0000000..84ab303
--- /dev/null
+++ b/_static/pygments.css
@@ -0,0 +1,75 @@
+pre { line-height: 125%; }
+td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
+span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
+td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
+span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
+.highlight .hll { background-color: #ffffcc }
+.highlight { background: #f8f8f8; }
+.highlight .c { color: #3D7B7B; font-style: italic } /* Comment */
+.highlight .err { border: 1px solid #FF0000 } /* Error */
+.highlight .k { color: #008000; font-weight: bold } /* Keyword */
+.highlight .o { color: #666666 } /* Operator */
+.highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
+.highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
+.highlight .cp { color: #9C6500 } /* Comment.Preproc */
+.highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */
+.highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */
+.highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
+.highlight .gd { color: #A00000 } /* Generic.Deleted */
+.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
+.highlight .gr { color: #E40000 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #008400 } /* Generic.Inserted */
+.highlight .go { color: #717171 } /* Generic.Output */
+.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
+.highlight .gs { font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #0044DD } /* Generic.Traceback */
+.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #008000 } /* Keyword.Pseudo */
+.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #B00040 } /* Keyword.Type */
+.highlight .m { color: #666666 } /* Literal.Number */
+.highlight .s { color: #BA2121 } /* Literal.String */
+.highlight .na { color: #687822 } /* Name.Attribute */
+.highlight .nb { color: #008000 } /* Name.Builtin */
+.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
+.highlight .no { color: #880000 } /* Name.Constant */
+.highlight .nd { color: #AA22FF } /* Name.Decorator */
+.highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */
+.highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
+.highlight .nf { color: #0000FF } /* Name.Function */
+.highlight .nl { color: #767600 } /* Name.Label */
+.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
+.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
+.highlight .nv { color: #19177C } /* Name.Variable */
+.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
+.highlight .mb { color: #666666 } /* Literal.Number.Bin */
+.highlight .mf { color: #666666 } /* Literal.Number.Float */
+.highlight .mh { color: #666666 } /* Literal.Number.Hex */
+.highlight .mi { color: #666666 } /* Literal.Number.Integer */
+.highlight .mo { color: #666666 } /* Literal.Number.Oct */
+.highlight .sa { color: #BA2121 } /* Literal.String.Affix */
+.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
+.highlight .sc { color: #BA2121 } /* Literal.String.Char */
+.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */
+.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
+.highlight .s2 { color: #BA2121 } /* Literal.String.Double */
+.highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */
+.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
+.highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */
+.highlight .sx { color: #008000 } /* Literal.String.Other */
+.highlight .sr { color: #A45A77 } /* Literal.String.Regex */
+.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
+.highlight .ss { color: #19177C } /* Literal.String.Symbol */
+.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
+.highlight .fm { color: #0000FF } /* Name.Function.Magic */
+.highlight .vc { color: #19177C } /* Name.Variable.Class */
+.highlight .vg { color: #19177C } /* Name.Variable.Global */
+.highlight .vi { color: #19177C } /* Name.Variable.Instance */
+.highlight .vm { color: #19177C } /* Name.Variable.Magic */
+.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
\ No newline at end of file
diff --git a/_static/searchtools.js b/_static/searchtools.js
new file mode 100644
index 0000000..2c774d1
--- /dev/null
+++ b/_static/searchtools.js
@@ -0,0 +1,632 @@
+/*
+ * Sphinx JavaScript utilities for the full-text search.
+ */
+"use strict";
+
+/**
+ * Simple result scoring code.
+ */
+if (typeof Scorer === "undefined") {
+ var Scorer = {
+ // Implement the following function to further tweak the score for each result
+ // The function takes a result array [docname, title, anchor, descr, score, filename]
+ // and returns the new score.
+ /*
+ score: result => {
+ const [docname, title, anchor, descr, score, filename, kind] = result
+ return score
+ },
+ */
+
+ // query matches the full name of an object
+ objNameMatch: 11,
+ // or matches in the last dotted part of the object name
+ objPartialMatch: 6,
+ // Additive scores depending on the priority of the object
+ objPrio: {
+ 0: 15, // used to be importantResults
+ 1: 5, // used to be objectResults
+ 2: -5, // used to be unimportantResults
+ },
+ // Used when the priority is not in the mapping.
+ objPrioDefault: 0,
+
+ // query found in title
+ title: 15,
+ partialTitle: 7,
+ // query found in terms
+ term: 5,
+ partialTerm: 2,
+ };
+}
+
+// Global search result kind enum, used by themes to style search results.
+class SearchResultKind {
+ static get index() { return "index"; }
+ static get object() { return "object"; }
+ static get text() { return "text"; }
+ static get title() { return "title"; }
+}
+
+const _removeChildren = (element) => {
+ while (element && element.lastChild) element.removeChild(element.lastChild);
+};
+
+/**
+ * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping
+ */
+const _escapeRegExp = (string) =>
+ string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
+
+const _displayItem = (item, searchTerms, highlightTerms) => {
+ const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
+ const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
+ const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
+ const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
+ const contentRoot = document.documentElement.dataset.content_root;
+
+ const [docName, title, anchor, descr, score, _filename, kind] = item;
+
+ let listItem = document.createElement("li");
+ // Add a class representing the item's type:
+ // can be used by a theme's CSS selector for styling
+ // See SearchResultKind for the class names.
+ listItem.classList.add(`kind-${kind}`);
+ let requestUrl;
+ let linkUrl;
+ if (docBuilder === "dirhtml") {
+ // dirhtml builder
+ let dirname = docName + "/";
+ if (dirname.match(/\/index\/$/))
+ dirname = dirname.substring(0, dirname.length - 6);
+ else if (dirname === "index/") dirname = "";
+ requestUrl = contentRoot + dirname;
+ linkUrl = requestUrl;
+ } else {
+ // normal html builders
+ requestUrl = contentRoot + docName + docFileSuffix;
+ linkUrl = docName + docLinkSuffix;
+ }
+ let linkEl = listItem.appendChild(document.createElement("a"));
+ linkEl.href = linkUrl + anchor;
+ linkEl.dataset.score = score;
+ linkEl.innerHTML = title;
+ if (descr) {
+ listItem.appendChild(document.createElement("span")).innerHTML =
+ " (" + descr + ")";
+ // highlight search terms in the description
+ if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
+ highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
+ }
+ else if (showSearchSummary)
+ fetch(requestUrl)
+ .then((responseData) => responseData.text())
+ .then((data) => {
+ if (data)
+ listItem.appendChild(
+ Search.makeSearchSummary(data, searchTerms, anchor)
+ );
+ // highlight search terms in the summary
+ if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
+ highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
+ });
+ Search.output.appendChild(listItem);
+};
+const _finishSearch = (resultCount) => {
+ Search.stopPulse();
+ Search.title.innerText = _("Search Results");
+ if (!resultCount)
+ Search.status.innerText = Documentation.gettext(
+ "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories."
+ );
+ else
+ Search.status.innerText = Documentation.ngettext(
+ "Search finished, found one page matching the search query.",
+ "Search finished, found ${resultCount} pages matching the search query.",
+ resultCount,
+ ).replace('${resultCount}', resultCount);
+};
+const _displayNextItem = (
+ results,
+ resultCount,
+ searchTerms,
+ highlightTerms,
+) => {
+ // results left, load the summary and display it
+ // this is intended to be dynamic (don't sub resultsCount)
+ if (results.length) {
+ _displayItem(results.pop(), searchTerms, highlightTerms);
+ setTimeout(
+ () => _displayNextItem(results, resultCount, searchTerms, highlightTerms),
+ 5
+ );
+ }
+ // search finished, update title and status message
+ else _finishSearch(resultCount);
+};
+// Helper function used by query() to order search results.
+// Each input is an array of [docname, title, anchor, descr, score, filename, kind].
+// Order the results by score (in opposite order of appearance, since the
+// `_displayNextItem` function uses pop() to retrieve items) and then alphabetically.
+const _orderResultsByScoreThenName = (a, b) => {
+ const leftScore = a[4];
+ const rightScore = b[4];
+ if (leftScore === rightScore) {
+ // same score: sort alphabetically
+ const leftTitle = a[1].toLowerCase();
+ const rightTitle = b[1].toLowerCase();
+ if (leftTitle === rightTitle) return 0;
+ return leftTitle > rightTitle ? -1 : 1; // inverted is intentional
+ }
+ return leftScore > rightScore ? 1 : -1;
+};
+
+/**
+ * Default splitQuery function. Can be overridden in ``sphinx.search`` with a
+ * custom function per language.
+ *
+ * The regular expression works by splitting the string on consecutive characters
+ * that are not Unicode letters, numbers, underscores, or emoji characters.
+ * This is the same as ``\W+`` in Python, preserving the surrogate pair area.
+ */
+if (typeof splitQuery === "undefined") {
+ var splitQuery = (query) => query
+ .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu)
+ .filter(term => term) // remove remaining empty strings
+}
+
+/**
+ * Search Module
+ */
+const Search = {
+ _index: null,
+ _queued_query: null,
+ _pulse_status: -1,
+
+ htmlToText: (htmlString, anchor) => {
+ const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
+ for (const removalQuery of [".headerlink", "script", "style"]) {
+ htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() });
+ }
+ if (anchor) {
+ const anchorContent = htmlElement.querySelector(`[role="main"] ${anchor}`);
+ if (anchorContent) return anchorContent.textContent;
+
+ console.warn(
+ `Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.`
+ );
+ }
+
+ // if anchor not specified or not found, fall back to main content
+ const docContent = htmlElement.querySelector('[role="main"]');
+ if (docContent) return docContent.textContent;
+
+ console.warn(
+ "Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template."
+ );
+ return "";
+ },
+
+ init: () => {
+ const query = new URLSearchParams(window.location.search).get("q");
+ document
+ .querySelectorAll('input[name="q"]')
+ .forEach((el) => (el.value = query));
+ if (query) Search.performSearch(query);
+ },
+
+ loadIndex: (url) =>
+ (document.body.appendChild(document.createElement("script")).src = url),
+
+ setIndex: (index) => {
+ Search._index = index;
+ if (Search._queued_query !== null) {
+ const query = Search._queued_query;
+ Search._queued_query = null;
+ Search.query(query);
+ }
+ },
+
+ hasIndex: () => Search._index !== null,
+
+ deferQuery: (query) => (Search._queued_query = query),
+
+ stopPulse: () => (Search._pulse_status = -1),
+
+ startPulse: () => {
+ if (Search._pulse_status >= 0) return;
+
+ const pulse = () => {
+ Search._pulse_status = (Search._pulse_status + 1) % 4;
+ Search.dots.innerText = ".".repeat(Search._pulse_status);
+ if (Search._pulse_status >= 0) window.setTimeout(pulse, 500);
+ };
+ pulse();
+ },
+
+ /**
+ * perform a search for something (or wait until index is loaded)
+ */
+ performSearch: (query) => {
+ // create the required interface elements
+ const searchText = document.createElement("h2");
+ searchText.textContent = _("Searching");
+ const searchSummary = document.createElement("p");
+ searchSummary.classList.add("search-summary");
+ searchSummary.innerText = "";
+ const searchList = document.createElement("ul");
+ searchList.setAttribute("role", "list");
+ searchList.classList.add("search");
+
+ const out = document.getElementById("search-results");
+ Search.title = out.appendChild(searchText);
+ Search.dots = Search.title.appendChild(document.createElement("span"));
+ Search.status = out.appendChild(searchSummary);
+ Search.output = out.appendChild(searchList);
+
+ const searchProgress = document.getElementById("search-progress");
+ // Some themes don't use the search progress node
+ if (searchProgress) {
+ searchProgress.innerText = _("Preparing search...");
+ }
+ Search.startPulse();
+
+ // index already loaded, the browser was quick!
+ if (Search.hasIndex()) Search.query(query);
+ else Search.deferQuery(query);
+ },
+
+ _parseQuery: (query) => {
+ // stem the search terms and add them to the correct list
+ const stemmer = new Stemmer();
+ const searchTerms = new Set();
+ const excludedTerms = new Set();
+ const highlightTerms = new Set();
+ const objectTerms = new Set(splitQuery(query.toLowerCase().trim()));
+ splitQuery(query.trim()).forEach((queryTerm) => {
+ const queryTermLower = queryTerm.toLowerCase();
+
+ // maybe skip this "word"
+ // stopwords array is from language_data.js
+ if (
+ stopwords.indexOf(queryTermLower) !== -1 ||
+ queryTerm.match(/^\d+$/)
+ )
+ return;
+
+ // stem the word
+ let word = stemmer.stemWord(queryTermLower);
+ // select the correct list
+ if (word[0] === "-") excludedTerms.add(word.substr(1));
+ else {
+ searchTerms.add(word);
+ highlightTerms.add(queryTermLower);
+ }
+ });
+
+ if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js
+ localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" "))
+ }
+
+ // console.debug("SEARCH: searching for:");
+ // console.info("required: ", [...searchTerms]);
+ // console.info("excluded: ", [...excludedTerms]);
+
+ return [query, searchTerms, excludedTerms, highlightTerms, objectTerms];
+ },
+
+ /**
+ * execute search (requires search index to be loaded)
+ */
+ _performSearch: (query, searchTerms, excludedTerms, highlightTerms, objectTerms) => {
+ const filenames = Search._index.filenames;
+ const docNames = Search._index.docnames;
+ const titles = Search._index.titles;
+ const allTitles = Search._index.alltitles;
+ const indexEntries = Search._index.indexentries;
+
+ // Collect multiple result groups to be sorted separately and then ordered.
+ // Each is an array of [docname, title, anchor, descr, score, filename, kind].
+ const normalResults = [];
+ const nonMainIndexResults = [];
+
+ _removeChildren(document.getElementById("search-progress"));
+
+ const queryLower = query.toLowerCase().trim();
+ for (const [title, foundTitles] of Object.entries(allTitles)) {
+ if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) {
+ for (const [file, id] of foundTitles) {
+ const score = Math.round(Scorer.title * queryLower.length / title.length);
+ const boost = titles[file] === title ? 1 : 0; // add a boost for document titles
+ normalResults.push([
+ docNames[file],
+ titles[file] !== title ? `${titles[file]} > ${title}` : title,
+ id !== null ? "#" + id : "",
+ null,
+ score + boost,
+ filenames[file],
+ SearchResultKind.title,
+ ]);
+ }
+ }
+ }
+
+ // search for explicit entries in index directives
+ for (const [entry, foundEntries] of Object.entries(indexEntries)) {
+ if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) {
+ for (const [file, id, isMain] of foundEntries) {
+ const score = Math.round(100 * queryLower.length / entry.length);
+ const result = [
+ docNames[file],
+ titles[file],
+ id ? "#" + id : "",
+ null,
+ score,
+ filenames[file],
+ SearchResultKind.index,
+ ];
+ if (isMain) {
+ normalResults.push(result);
+ } else {
+ nonMainIndexResults.push(result);
+ }
+ }
+ }
+ }
+
+ // lookup as object
+ objectTerms.forEach((term) =>
+ normalResults.push(...Search.performObjectSearch(term, objectTerms))
+ );
+
+ // lookup as search terms in fulltext
+ normalResults.push(...Search.performTermsSearch(searchTerms, excludedTerms));
+
+ // let the scorer override scores with a custom scoring function
+ if (Scorer.score) {
+ normalResults.forEach((item) => (item[4] = Scorer.score(item)));
+ nonMainIndexResults.forEach((item) => (item[4] = Scorer.score(item)));
+ }
+
+ // Sort each group of results by score and then alphabetically by name.
+ normalResults.sort(_orderResultsByScoreThenName);
+ nonMainIndexResults.sort(_orderResultsByScoreThenName);
+
+ // Combine the result groups in (reverse) order.
+ // Non-main index entries are typically arbitrary cross-references,
+ // so display them after other results.
+ let results = [...nonMainIndexResults, ...normalResults];
+
+ // remove duplicate search results
+ // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept
+ let seen = new Set();
+ results = results.reverse().reduce((acc, result) => {
+ let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(',');
+ if (!seen.has(resultStr)) {
+ acc.push(result);
+ seen.add(resultStr);
+ }
+ return acc;
+ }, []);
+
+ return results.reverse();
+ },
+
+ query: (query) => {
+ const [searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms] = Search._parseQuery(query);
+ const results = Search._performSearch(searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms);
+
+ // for debugging
+ //Search.lastresults = results.slice(); // a copy
+ // console.info("search results:", Search.lastresults);
+
+ // print the results
+ _displayNextItem(results, results.length, searchTerms, highlightTerms);
+ },
+
+ /**
+ * search for object names
+ */
+ performObjectSearch: (object, objectTerms) => {
+ const filenames = Search._index.filenames;
+ const docNames = Search._index.docnames;
+ const objects = Search._index.objects;
+ const objNames = Search._index.objnames;
+ const titles = Search._index.titles;
+
+ const results = [];
+
+ const objectSearchCallback = (prefix, match) => {
+ const name = match[4]
+ const fullname = (prefix ? prefix + "." : "") + name;
+ const fullnameLower = fullname.toLowerCase();
+ if (fullnameLower.indexOf(object) < 0) return;
+
+ let score = 0;
+ const parts = fullnameLower.split(".");
+
+ // check for different match types: exact matches of full name or
+ // "last name" (i.e. last dotted part)
+ if (fullnameLower === object || parts.slice(-1)[0] === object)
+ score += Scorer.objNameMatch;
+ else if (parts.slice(-1)[0].indexOf(object) > -1)
+ score += Scorer.objPartialMatch; // matches in last name
+
+ const objName = objNames[match[1]][2];
+ const title = titles[match[0]];
+
+ // If more than one term searched for, we require other words to be
+ // found in the name/title/description
+ const otherTerms = new Set(objectTerms);
+ otherTerms.delete(object);
+ if (otherTerms.size > 0) {
+ const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase();
+ if (
+ [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0)
+ )
+ return;
+ }
+
+ let anchor = match[3];
+ if (anchor === "") anchor = fullname;
+ else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname;
+
+ const descr = objName + _(", in ") + title;
+
+ // add custom score for some objects according to scorer
+ if (Scorer.objPrio.hasOwnProperty(match[2]))
+ score += Scorer.objPrio[match[2]];
+ else score += Scorer.objPrioDefault;
+
+ results.push([
+ docNames[match[0]],
+ fullname,
+ "#" + anchor,
+ descr,
+ score,
+ filenames[match[0]],
+ SearchResultKind.object,
+ ]);
+ };
+ Object.keys(objects).forEach((prefix) =>
+ objects[prefix].forEach((array) =>
+ objectSearchCallback(prefix, array)
+ )
+ );
+ return results;
+ },
+
+ /**
+ * search for full-text terms in the index
+ */
+ performTermsSearch: (searchTerms, excludedTerms) => {
+ // prepare search
+ const terms = Search._index.terms;
+ const titleTerms = Search._index.titleterms;
+ const filenames = Search._index.filenames;
+ const docNames = Search._index.docnames;
+ const titles = Search._index.titles;
+
+ const scoreMap = new Map();
+ const fileMap = new Map();
+
+ // perform the search on the required terms
+ searchTerms.forEach((word) => {
+ const files = [];
+ const arr = [
+ { files: terms[word], score: Scorer.term },
+ { files: titleTerms[word], score: Scorer.title },
+ ];
+ // add support for partial matches
+ if (word.length > 2) {
+ const escapedWord = _escapeRegExp(word);
+ if (!terms.hasOwnProperty(word)) {
+ Object.keys(terms).forEach((term) => {
+ if (term.match(escapedWord))
+ arr.push({ files: terms[term], score: Scorer.partialTerm });
+ });
+ }
+ if (!titleTerms.hasOwnProperty(word)) {
+ Object.keys(titleTerms).forEach((term) => {
+ if (term.match(escapedWord))
+ arr.push({ files: titleTerms[term], score: Scorer.partialTitle });
+ });
+ }
+ }
+
+ // no match but word was a required one
+ if (arr.every((record) => record.files === undefined)) return;
+
+ // found search word in contents
+ arr.forEach((record) => {
+ if (record.files === undefined) return;
+
+ let recordFiles = record.files;
+ if (recordFiles.length === undefined) recordFiles = [recordFiles];
+ files.push(...recordFiles);
+
+ // set score for the word in each file
+ recordFiles.forEach((file) => {
+ if (!scoreMap.has(file)) scoreMap.set(file, {});
+ scoreMap.get(file)[word] = record.score;
+ });
+ });
+
+ // create the mapping
+ files.forEach((file) => {
+ if (!fileMap.has(file)) fileMap.set(file, [word]);
+ else if (fileMap.get(file).indexOf(word) === -1) fileMap.get(file).push(word);
+ });
+ });
+
+ // now check if the files don't contain excluded terms
+ const results = [];
+ for (const [file, wordList] of fileMap) {
+ // check if all requirements are matched
+
+ // as search terms with length < 3 are discarded
+ const filteredTermCount = [...searchTerms].filter(
+ (term) => term.length > 2
+ ).length;
+ if (
+ wordList.length !== searchTerms.size &&
+ wordList.length !== filteredTermCount
+ )
+ continue;
+
+ // ensure that none of the excluded terms is in the search result
+ if (
+ [...excludedTerms].some(
+ (term) =>
+ terms[term] === file ||
+ titleTerms[term] === file ||
+ (terms[term] || []).includes(file) ||
+ (titleTerms[term] || []).includes(file)
+ )
+ )
+ break;
+
+ // select one (max) score for the file.
+ const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w]));
+ // add result to the result list
+ results.push([
+ docNames[file],
+ titles[file],
+ "",
+ null,
+ score,
+ filenames[file],
+ SearchResultKind.text,
+ ]);
+ }
+ return results;
+ },
+
+ /**
+ * helper function to return a node containing the
+ * search summary for a given text. keywords is a list
+ * of stemmed words.
+ */
+ makeSearchSummary: (htmlText, keywords, anchor) => {
+ const text = Search.htmlToText(htmlText, anchor);
+ if (text === "") return null;
+
+ const textLower = text.toLowerCase();
+ const actualStartPosition = [...keywords]
+ .map((k) => textLower.indexOf(k.toLowerCase()))
+ .filter((i) => i > -1)
+ .slice(-1)[0];
+ const startWithContext = Math.max(actualStartPosition - 120, 0);
+
+ const top = startWithContext === 0 ? "" : "...";
+ const tail = startWithContext + 240 < text.length ? "..." : "";
+
+ let summary = document.createElement("p");
+ summary.classList.add("context");
+ summary.textContent = top + text.substr(startWithContext, 240).trim() + tail;
+
+ return summary;
+ },
+};
+
+_ready(Search.init);
diff --git a/_static/sphinx_highlight.js b/_static/sphinx_highlight.js
new file mode 100644
index 0000000..8a96c69
--- /dev/null
+++ b/_static/sphinx_highlight.js
@@ -0,0 +1,154 @@
+/* Highlighting utilities for Sphinx HTML documentation. */
+"use strict";
+
+const SPHINX_HIGHLIGHT_ENABLED = true
+
+/**
+ * highlight a given string on a node by wrapping it in
+ * span elements with the given class name.
+ */
+const _highlight = (node, addItems, text, className) => {
+ if (node.nodeType === Node.TEXT_NODE) {
+ const val = node.nodeValue;
+ const parent = node.parentNode;
+ const pos = val.toLowerCase().indexOf(text);
+ if (
+ pos >= 0 &&
+ !parent.classList.contains(className) &&
+ !parent.classList.contains("nohighlight")
+ ) {
+ let span;
+
+ const closestNode = parent.closest("body, svg, foreignObject");
+ const isInSVG = closestNode && closestNode.matches("svg");
+ if (isInSVG) {
+ span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
+ } else {
+ span = document.createElement("span");
+ span.classList.add(className);
+ }
+
+ span.appendChild(document.createTextNode(val.substr(pos, text.length)));
+ const rest = document.createTextNode(val.substr(pos + text.length));
+ parent.insertBefore(
+ span,
+ parent.insertBefore(
+ rest,
+ node.nextSibling
+ )
+ );
+ node.nodeValue = val.substr(0, pos);
+ /* There may be more occurrences of search term in this node. So call this
+ * function recursively on the remaining fragment.
+ */
+ _highlight(rest, addItems, text, className);
+
+ if (isInSVG) {
+ const rect = document.createElementNS(
+ "http://www.w3.org/2000/svg",
+ "rect"
+ );
+ const bbox = parent.getBBox();
+ rect.x.baseVal.value = bbox.x;
+ rect.y.baseVal.value = bbox.y;
+ rect.width.baseVal.value = bbox.width;
+ rect.height.baseVal.value = bbox.height;
+ rect.setAttribute("class", className);
+ addItems.push({ parent: parent, target: rect });
+ }
+ }
+ } else if (node.matches && !node.matches("button, select, textarea")) {
+ node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
+ }
+};
+const _highlightText = (thisNode, text, className) => {
+ let addItems = [];
+ _highlight(thisNode, addItems, text, className);
+ addItems.forEach((obj) =>
+ obj.parent.insertAdjacentElement("beforebegin", obj.target)
+ );
+};
+
+/**
+ * Small JavaScript module for the documentation.
+ */
+const SphinxHighlight = {
+
+ /**
+ * highlight the search words provided in localstorage in the text
+ */
+ highlightSearchWords: () => {
+ if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight
+
+ // get and clear terms from localstorage
+ const url = new URL(window.location);
+ const highlight =
+ localStorage.getItem("sphinx_highlight_terms")
+ || url.searchParams.get("highlight")
+ || "";
+ localStorage.removeItem("sphinx_highlight_terms")
+ url.searchParams.delete("highlight");
+ window.history.replaceState({}, "", url);
+
+ // get individual terms from highlight string
+ const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
+ if (terms.length === 0) return; // nothing to do
+
+ // There should never be more than one element matching "div.body"
+ const divBody = document.querySelectorAll("div.body");
+ const body = divBody.length ? divBody[0] : document.querySelector("body");
+ window.setTimeout(() => {
+ terms.forEach((term) => _highlightText(body, term, "highlighted"));
+ }, 10);
+
+ const searchBox = document.getElementById("searchbox");
+ if (searchBox === null) return;
+ searchBox.appendChild(
+ document
+ .createRange()
+ .createContextualFragment(
+ '
' +
+ '' +
+ _("Hide Search Matches") +
+ "
"
+ )
+ );
+ },
+
+ /**
+ * helper function to hide the search marks again
+ */
+ hideSearchWords: () => {
+ document
+ .querySelectorAll("#searchbox .highlight-link")
+ .forEach((el) => el.remove());
+ document
+ .querySelectorAll("span.highlighted")
+ .forEach((el) => el.classList.remove("highlighted"));
+ localStorage.removeItem("sphinx_highlight_terms")
+ },
+
+ initEscapeListener: () => {
+ // only install a listener if it is really needed
+ if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return;
+
+ document.addEventListener("keydown", (event) => {
+ // bail for input elements
+ if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
+ // bail with special keys
+ if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;
+ if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) {
+ SphinxHighlight.hideSearchWords();
+ event.preventDefault();
+ }
+ });
+ },
+};
+
+_ready(() => {
+ /* Do not call highlightSearchWords() when we are on the search page.
+ * It will highlight words from the *previous* search query.
+ */
+ if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords();
+ SphinxHighlight.initEscapeListener();
+});
diff --git a/genindex.html b/genindex.html
new file mode 100644
index 0000000..72660d2
--- /dev/null
+++ b/genindex.html
@@ -0,0 +1,452 @@
+
+
+
+
+
+
+
+
Index — MicroPython course 1.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MicroPython course
+
+
+
+
+
+
+
+
+
+
Index
+
+
+
A
+ |
B
+ |
C
+ |
D
+ |
F
+ |
H
+ |
I
+ |
L
+ |
M
+ |
O
+ |
P
+ |
R
+ |
S
+ |
T
+ |
W
+
+
+
A
+
+
+
B
+
+
+
C
+
+
+
D
+
+
+
F
+
+
+
H
+
+
+
I
+
+
+
L
+
+
+
M
+
+
+
O
+
+
+
P
+
+
+
R
+
+
+
S
+
+
+
T
+
+
+
W
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..0ee0e0e
--- /dev/null
+++ b/index.html
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+
+
+
Welcome to MicroPython course’s documentation! — MicroPython course 1.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MicroPython course
+
+
+
+
+
+
+
+
+
+Welcome to MicroPython course’s documentation!
+
+
+Release:
+1.0
+
+Date:
+Feb 11, 2025
+
+
+
+General documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/installation.html b/installation.html
new file mode 100644
index 0000000..38c4d05
--- /dev/null
+++ b/installation.html
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+
Installation — MicroPython course 1.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MicroPython course
+
+
+
+
+
+
+
+
+
+Installation
+To get started with MicroPython, follow these steps to install and run it on your hardware.
+
+Install the MicroPython firmware on your board.
+Install the Thonny IDE .
+Clone the course repository
+$ git clone https://github.com/tomas-fryza/esp-micropython.git
+
+
+
+Run scripts from the examples
folder.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/bme280.html b/modules/bme280.html
new file mode 100644
index 0000000..9dfefaa
--- /dev/null
+++ b/modules/bme280.html
@@ -0,0 +1,316 @@
+
+
+
+
+
+
+
+
+
BME280 sensor — MicroPython course 1.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MicroPython course
+
+
+
+
+
+
+
+
+
+BME280 sensor
+
+
+class bme280. BME280 ( i2c = None , mode = 1 , addr = 118 , ** kwargs ) [source]
+Bases: object
+
+
+altitude ( sea_level_pressure_hpa = 1013.25 ) [source]
+Return the approximative altitude in meters.
+
+
+
+
+humidity ( ) [source]
+Return the humidity in percent.
+
+
+
+
+pressure ( ) [source]
+Return the pressure in hPa.
+
+
+
+
+read_humidity ( ) [source]
+
+
+
+
+read_pressure ( ) [source]
+Gets the compensated pressure in Pascals.
+
+
+
+
+read_raw_humidity ( ) [source]
+Assumes that the temperature has already been read
+
+
+
+
+read_raw_pressure ( ) [source]
+Reads the raw (uncompensated) pressure level from the sensor.
+
+
+
+
+read_raw_temp ( ) [source]
+Reads the raw (uncompensated) temperature from the sensor.
+
+
+
+
+read_temperature ( ) [source]
+Get the compensated temperature in 0.01 of a degree celsius.
+
+
+
+
+read_values ( ) [source]
+Read temperature, humidity, pressure, and altitude
+from the sensor.
+
+
+
+
+temperature ( ) [source]
+Return the temperature in degrees.
+
+
+
+
+
+
+class bme280. Device ( address , i2c ) [source]
+Bases: object
+Class for communicating with an I2C device.
+Allows reading and writing 8-bit, 16-bit, and byte array values to
+registers on the device.
+
+
+readRaw8 ( ) [source]
+Read an 8-bit value on the bus (without register).
+
+
+
+
+readS16 ( register , little_endian = True ) [source]
+Read a signed 16-bit value from the specified register, with the
+specified endianness (default little endian, or least significant byte
+first).
+
+
+
+
+readS16BE ( register ) [source]
+Read a signed 16-bit value from the specified register, in big
+endian byte order.
+
+
+
+
+readS16LE ( register ) [source]
+Read a signed 16-bit value from the specified register, in little
+endian byte order.
+
+
+
+
+readS8 ( register ) [source]
+Read a signed byte from the specified register.
+
+
+
+
+readU16 ( register , little_endian = True ) [source]
+Read an unsigned 16-bit value from the specified register, with the
+specified endianness (default little endian, or least significant byte
+first).
+
+
+
+
+readU16BE ( register ) [source]
+Read an unsigned 16-bit value from the specified register, in big
+endian byte order.
+
+
+
+
+readU16LE ( register ) [source]
+Read an unsigned 16-bit value from the specified register, in little
+endian byte order.
+
+
+
+
+readU8 ( register ) [source]
+Read an unsigned byte from the specified register.
+
+
+
+
+write16 ( register , value ) [source]
+Write a 16-bit value to the specified register.
+
+
+
+
+write8 ( register , value ) [source]
+Write an 8-bit value to the specified register.
+
+
+
+
+writeRaw8 ( value ) [source]
+Write an 8-bit value on the bus (without register).
+
+
+
+
+
+
+bme280. demo ( ) [source]
+Demonstrates the usage of the BME280 class by reading
+temperature, humidity, and pressure.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/dht12.html b/modules/dht12.html
new file mode 100644
index 0000000..3de6ff4
--- /dev/null
+++ b/modules/dht12.html
@@ -0,0 +1,299 @@
+
+
+
+
+
+
+
+
+
DHT12 sensor driver — MicroPython course 1.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MicroPython course
+
+
+
+
+
+
+
+
+
+DHT12 sensor driver
+This module provides a MicroPython driver for the Aosong DHT12
+temperature and humidity sensor, which communicates over I2C.
+It includes classes and methods for reading temperature and
+humidity data from the sensor.
+
+
+
+Example
+from dht12 import DHT12
+from machine import I2C , Pin
+
+# Initialize I2C interface
+i2c = I2C ( 0 , scl = Pin ( 22 ), sda = Pin ( 21 ))
+
+# Create an instance of the DHT12 sensor
+sensor = DHT12 ( i2c )
+
+# Read and print temperature and humidity values
+temperature , humidity = sensor . read_values ()
+print ( f "Temperature: { temperature } °C, Humidity: { humidity } %" )
+
+
+
+
+Authors
+
+Mike Causer, PyPI
+Tomas Fryza
+
+
+
+Modification history
+
+2024-11-11 : Added Sphinx comments.
+2024-11-02 : Added read_values method.
+2023-11-10 : Added scan method.
+
+
+
+
+class dht12. DHT12 ( i2c , addr = 92 ) [source]
+Bases: DHTBaseI2C
+
+
+humidity ( ) [source]
+Calculates and returns the humidity as a floating-point value,
+using data previously read into the buffer (self.buf ) by the
+measure method.
+
+Returns:
+The current humidity as a percentage.
+
+Example:
+sensor = DHT12 ( i2c )
+sensor . measure () # Read data from sensor
+humidity = sensor . humidity ()
+print ( f "Humidity: { humidity } %" )
+
+
+
+
+
+
+
+
+read_values ( ) [source]
+Read temperature and humidity from the sensor.
+
+Returns:
+A tuple containing the temperature (float)
+and humidity (float) values.
+
+
+
+
+
+
+temperature ( ) [source]
+Calculates and returns the temperature in degrees Celsius as a
+floating-point value, using data stored in the buffer (self.buf )
+by the measure method. It interprets both positive and negative
+temperatures.
+
+Returns:
+The current temperature in degrees Celsius.
+
+Example:
+sensor = DHT12 ( i2c )
+sensor . measure () # Read data from sensor
+temperature = sensor . temperature ()
+print ( f "Temperature: { temperature } °C" )
+
+
+
+
+
+
+
+
+
+
+class dht12. DHTBaseI2C ( i2c , addr = 92 ) [source]
+Bases: object
+
+
+measure ( ) [source]
+Reads 5 bytes of data from the DHT12 sensor’s memory and performs
+a checksum validation to ensure data integrity. The retrieved data
+is stored in the buffer (self.buf ). If the checksum validation fails,
+an exception is raised.
+
+Raises:
+Exception – If the checksum validation fails, indicating potential
+data corruption.
+
+Example:
+sensor = DHT12 ( i2c )
+try :
+ sensor . measure ()
+ print ( "Data read successfully." )
+except Exception as e :
+ print ( "Checksum error:" , e )
+
+
+
+
+
+
+
+
+scan ( ) [source]
+Checks if the DHT12 sensor is available on the I2C bus by scanning
+for its specified address (SENSOR_ADDR ). If the sensor is not
+found, it raises an exception.
+
+Raises:
+Exception – If the sensor address (SENSOR_ADDR ) is not
+detected on the I2C bus.
+
+Example:
+sensor = DHT12 ( i2c )
+try :
+ sensor . scan ()
+ print ( "Sensor detected." )
+except Exception as e :
+ print ( e )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/hw_config.html b/modules/hw_config.html
new file mode 100644
index 0000000..6be4098
--- /dev/null
+++ b/modules/hw_config.html
@@ -0,0 +1,288 @@
+
+
+
+
+
+
+
+
+
Basic I/O components — MicroPython course 1.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MicroPython course
+
+
+
+
+
+
+
+
+
+Basic I/O components
+This module provides classes to manage common input/output components,
+such as buttons and LEDs, with support for PWM-based brightness control
+for LEDs. The classes allow for checking button states, toggling LEDs,
+blinking LEDs, and controlling brightness and fading effects using PWM.
+
+Example
+from hw_config import Led
+
+led = Led ( 2 )
+
+print ( "LED blinking..." )
+led . blink ( times = 3 )
+
+print ( "Toggling LED..." )
+led . toggle ()
+
+# Example of using the PwmLed class
+led = PwmLed ( 2 )
+
+print ( "Fading in..." )
+led . fade_in ( duration = 2 )
+
+
+
+
+
+Modification history
+
+2024-11-11 : Added Sphinx-style comments for documentation.
+2024-10-26 : Added demo method to demonstrate usage of the classes.
+2024-09-28 : File created, initial release.
+
+
+
+
+class hw_config. Button ( pin_number ) [source]
+Bases: object
+A class to manage a button connected to a GPIO pin with a pull-up resistor.
+
+
+is_pressed ( ) [source]
+Check if the button is currently pressed using active-low logic.
+
+Returns:
+True if the button is pressed; False otherwise.
+
+
+
+
+
+
+
+
+class hw_config. Led ( * args : Any , ** kwargs : Any ) [source]
+Bases: Pin
+A class to control an LED connected to a specified GPIO pin.
+
+
+blink ( duration = 0.5 , times = 5 ) [source]
+Blink the LED a specified number of times.
+
+Parameters:
+
+
+
+
+
+
+
+toggle ( ) [source]
+Toggle the LED state between on and off.
+
+
+
+
+
+
+class hw_config. PwmLed ( * args : Any , ** kwargs : Any ) [source]
+Bases: PWM
+A class to control an LED using PWM, allowing for brightness
+adjustment, fading, and on/off control.
+
+
+fade_in ( duration = 1 ) [source]
+Gradually increase the brightness to create a fade-in effect.
+
+Parameters:
+duration – Total duration of the fade-in effect, in seconds.
+Default is 1 second.
+
+
+
+
+
+
+fade_out ( duration = 1 ) [source]
+Gradually decrease the brightness to create a fade-out effect.
+
+Parameters:
+duration – Total duration of the fade-out effect, in seconds.
+Default is 1 second.
+
+
+
+
+
+
+off ( ) [source]
+Turn the LED off by setting the brightness to 0.
+
+
+
+
+on ( brightness = 100 ) [source]
+Turn the LED on by setting it to a specified brightness level.
+
+Parameters:
+brightness – Brightness level as a percentage (0 to 100).
+Default is 100%.
+
+
+
+
+
+
+set_brightness ( brightness ) [source]
+Set the LED brightness using PWM.
+
+Parameters:
+brightness – Brightness level as a percentage (0 to 100).
+
+
+
+
+
+
+
+
+hw_config. demo ( ) [source]
+Demonstrates usage of the Button , Led , and PwmLed classes.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/lcd.html b/modules/lcd.html
new file mode 100644
index 0000000..bc061e0
--- /dev/null
+++ b/modules/lcd.html
@@ -0,0 +1,252 @@
+
+
+
+
+
+
+
+
+
HD44780-based LCD driver — MicroPython course 1.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MicroPython course
+
+
+
+
+
+
+
+
+
+HD44780-based LCD driver
+This module provides a simple interface for controlling character LCDs
+based on the HD44780 driver. It supports displaying text, controlling the
+cursor position, and creating custom characters on the LCD screen.
+
+Example
+from machine import Pin
+import time
+from lcd_hd44780 import LcdHd44780
+
+# Initialize the LCD with control pins (RS, E) and data pins (D4, D5, D6, D7)
+lcd = LcdHd44780 ( rs = 26 , e = 25 , d = [ 13 , 10 , 9 , 27 ])
+
+# Move cursor to line 1, column 3 and display text
+lcd . move_to ( 1 , 3 )
+lcd . write ( "Hello, World!" )
+
+lcd . move_to ( 2 , 5 )
+lcd . write ( "MicroPython" )
+
+
+
+
+
+Modification history
+
+2024-11-11 : Added Sphinx-style comments for documentation.
+2024-10-26 : Added demo method to demonstrate usage of the display.
+2023-10-17 : File created, initial release.
+
+
+
+
+class lcd_hd44780. LcdHd44780 ( rs , e , d ) [source]
+Bases: object
+
+
+command ( cmd ) [source]
+Send a command byte to the LCD controller. This method writes to
+the command register of the LCD (RS = 0).
+
+Parameters:
+cmd – The command byte to send to the LCD.
+
+
+
+
+
+
+custom_char ( addr , charmap ) [source]
+This method writes the pixel data for the custom character to one of
+the 8 available character generator RAM (CGRAM) locations.
+
+Parameters:
+
+
+
+
+
+
+
+
+data ( val ) [source]
+Send a data byte to the LCD controller. This method writes to
+the data register of the LCD (RS = 1).
+
+Parameters:
+val – The data byte to send to the LCD.
+
+
+
+
+
+
+move_to ( line , column ) [source]
+Move the cursor to a specified position on the LCD. The method
+supports two lines.
+
+Parameters:
+
+
+
+
+
+
+
+write ( s ) [source]
+Display a string of characters on the LCD. This method writes
+each character of the string to the LCD, one by one.
+
+Parameters:
+s – The string of characters to display on the LCD.
+
+
+
+
+
+
+
+
+lcd_hd44780. demo ( ) [source]
+Demonstrates the usage of the LcdHd44780 class by initializing an
+LCD display, positioning text, and displaying a sample message.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/oled.html b/modules/oled.html
new file mode 100644
index 0000000..d1121db
--- /dev/null
+++ b/modules/oled.html
@@ -0,0 +1,281 @@
+
+
+
+
+
+
+
+
+
SH1106-based OLED driver — MicroPython course 1.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MicroPython course
+
+
+
+
+
+
+
+
+
+SH1106-based OLED driver
+This module provides an interface for controlling an OLED display using
+the SH1106 driver over the I2C protocol. It allows users to control the
+display’s power, contrast, and pixel data, as well as render text and
+images. It inherits from the framebuf.FrameBuffer class to enable drawing
+on the display’s buffer and updating the OLED screen.
+
+Example
+from sh1106 import SH1106_I2C
+
+# Init OLED display
+i2c = I2C ( 0 , scl = Pin ( 22 ), sda = Pin ( 21 ), freq = 400_000 )
+oled = SH1106_I2C ( i2c )
+
+# Add some text at (x, y)
+oled . text ( "Using OLED and" , 0 , 40 )
+oled . text ( "ESP32" , 50 , 50 )
+
+# Update the OLED display so the text is displayed
+oled . show ()
+
+
+
+
+Authors:
+
+Shujen Chen et al., Raspberry Pi Pico Interfacing and Programming with MicroPython
+MicroPython SH1106 OLED driver, I2C and SPI interfaces
+Tomas Fryza
+
+
+
+Modification history
+
+2024-11-11 : Added Sphinx-style comments for documentation.
+2024-11-02 : Added demo method to demonstrate usage of the display.
+2023-10-27 : File created, initial release.
+
+
+
+
+class sh1106. SH1106_I2C ( * args : Any , ** kwargs : Any ) [source]
+Bases: FrameBuffer
+
+
+DEV_ADDR = 60 [source]
+
+
+
+
+HEIGHT = 64 [source]
+
+
+
+
+HIGH_COLUMN_ADDR = 16 [source]
+
+
+
+
+LOW_COLUMN_ADDR = 0 [source]
+
+
+
+
+PAGES = 8 [source]
+
+
+
+
+PAGE_ADDRESS = 176 [source]
+
+
+
+
+WIDTH = 128 [source]
+
+
+
+
+contrast ( val ) [source]
+Set the contrast of the OLED display.
+
+Parameters:
+val – Contrast value (0 to 255).
+
+
+
+
+
+
+poweroff ( ) [source]
+Turn off the OLED display.
+
+
+
+
+poweron ( ) [source]
+Turn on the OLED display.
+
+
+
+
+show ( ) [source]
+Refresh the OLED display with the current buffer data.
+
+
+
+
+sleep ( value ) [source]
+Put the OLED display into sleep mode or wake it up.
+
+
+
+
+write_cmd ( cmd ) [source]
+Write a command byte to the SH1106 OLED display.
+
+Parameters:
+cmd – The command byte to be sent to the display.
+
+
+
+
+
+
+write_data ( data ) [source]
+Write a data buffer to the SH1106 OLED display.
+
+Parameters:
+data – A byte array containing the data to be sent.
+
+
+
+
+
+
+
+
+sh1106. demo ( ) [source]
+Demo function to showcase the usage of the SH1106 OLED display.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/wifi.html b/modules/wifi.html
new file mode 100644
index 0000000..7ef63c9
--- /dev/null
+++ b/modules/wifi.html
@@ -0,0 +1,206 @@
+
+
+
+
+
+
+
+
+
Wi-Fi — MicroPython course 1.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MicroPython course
+
+
+
+
+
+
+
+
+
+Wi-Fi
+This module provides functions for connecting to and
+disconnecting from a Wi-Fi network using MicroPython on
+ESP8266 or ESP32 devices.
+
+Example
+from wifi_module import connect , disconnect
+
+# Initialize the Wi-Fi interface in Station mode
+wifi = network . WLAN ( network . STA_IF )
+
+# Connect to Wi-Fi
+if connect ( wifi , "Your_SSID" , "Your_Password" ):
+ print ( "Connected to Wi-Fi!" )
+else :
+ print ( "Failed to connect." )
+
+# Disconnect from Wi-Fi
+disconnect ( wifi )
+print ( "Disconnected from Wi-Fi." )
+
+
+
+
+
+Modification history
+
+2024-12-14 : Prefixes added to print statements.
+2024-11-11 : Added Sphinx comments.
+2024-11-02 : Added print_status method.
+2023-06-17 : Created connect and disconnect methods.
+
+
+
+
+wifi_module. connect ( wifi , ssid , password ) [source]
+Connect to a specified Wi-Fi network using the provided
+SSID and password. If the connection attempt exceeds the
+specified timeout, it will terminate and return False .
+
+Parameters:
+
+wifi – The Wi-Fi interface object to use for the connection.
+ssid (str ) – The SSID of the Wi-Fi network to connect to.
+password (str ) – The password for the Wi-Fi network.
+
+
+Returns:
+True if connected successfully, False if
+the connection attempt timed out.
+
+
+
+
+
+
+wifi_module. disconnect ( wifi ) [source]
+Deactivates the specified Wi-Fi interface and checks if
+the device is not connected to any Wi-Fi network.
+
+Parameters:
+wifi – The Wi-Fi interface object to disconnect.
+
+
+
+
+
+
+wifi_module. print_status ( wifi ) [source]
+Retrieves the status of the specified Wi-Fi interface and
+prints a human-readable message corresponding to that status.
+
+Parameters:
+wifi – The Wi-Fi interface object whose status is to
+be printed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/objects.inv b/objects.inv
new file mode 100644
index 0000000..f13de0e
Binary files /dev/null and b/objects.inv differ
diff --git a/py-modindex.html b/py-modindex.html
new file mode 100644
index 0000000..5079f38
--- /dev/null
+++ b/py-modindex.html
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+
+
Python Module Index — MicroPython course 1.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MicroPython course
+
+
+
+
+
+
+
+ Python Module Index
+
+
+
+
+
+
+
+
+
+
Python Module Index
+
+
+
b |
+
d |
+
h |
+
l |
+
s |
+
w
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/search.html b/search.html
new file mode 100644
index 0000000..5bd79f1
--- /dev/null
+++ b/search.html
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
Search — MicroPython course 1.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MicroPython course
+
+
+
+
+
+
+
+
+
+
+
+ Please activate JavaScript to enable the search functionality.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/searchindex.js b/searchindex.js
new file mode 100644
index 0000000..bb4ef15
--- /dev/null
+++ b/searchindex.js
@@ -0,0 +1 @@
+Search.setIndex({"alltitles": {"Attributes": [[3, "attributes"]], "Author": [[4, "author"]], "Authors": [[3, "authors"], [5, "authors"], [7, "authors"]], "Authors:": [[6, "authors"]], "BME280 sensor": [[2, null]], "Basic I/O components": [[4, null]], "Classes": [[3, "classes"]], "DHT12 sensor driver": [[3, null]], "Example": [[3, "example"], [4, "example"], [5, "example"], [6, "example"], [7, "example"]], "General documentation": [[0, "general-documentation"]], "HD44780-based LCD driver": [[5, null]], "Installation": [[1, null]], "Modification history": [[3, "modification-history"], [4, "modification-history"], [5, "modification-history"], [6, "modification-history"], [7, "modification-history"]], "Modules": [[0, "modules"]], "SH1106-based OLED driver": [[6, null]], "Welcome to MicroPython course\u2019s documentation!": [[0, null]], "Wi-Fi": [[7, null]]}, "docnames": ["index", "installation", "modules/bme280", "modules/dht12", "modules/hw_config", "modules/lcd", "modules/oled", "modules/wifi"], "envversion": {"sphinx": 64, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2}, "filenames": ["index.rst", "installation.rst", "modules/bme280.rst", "modules/dht12.rst", "modules/hw_config.rst", "modules/lcd.rst", "modules/oled.rst", "modules/wifi.rst"], "indexentries": {"altitude() (bme280.bme280 method)": [[2, "bme280.BME280.altitude", false]], "blink() (hw_config.led method)": [[4, "hw_config.Led.blink", false]], "bme280": [[2, "module-bme280", false]], "bme280 (class in bme280)": [[2, "bme280.BME280", false]], "button (class in hw_config)": [[4, "hw_config.Button", false]], "command() (lcd_hd44780.lcdhd44780 method)": [[5, "lcd_hd44780.LcdHd44780.command", false]], "connect() (in module wifi_module)": [[7, "wifi_module.connect", false]], "contrast() (sh1106.sh1106_i2c method)": [[6, "sh1106.SH1106_I2C.contrast", false]], "custom_char() (lcd_hd44780.lcdhd44780 method)": [[5, "lcd_hd44780.LcdHd44780.custom_char", false]], "data() (lcd_hd44780.lcdhd44780 method)": [[5, "lcd_hd44780.LcdHd44780.data", false]], "demo() (in module bme280)": [[2, "bme280.demo", false]], "demo() (in module hw_config)": [[4, "hw_config.demo", false]], "demo() (in module lcd_hd44780)": [[5, "lcd_hd44780.demo", false]], "demo() (in module sh1106)": [[6, "sh1106.demo", false]], "dev_addr (sh1106.sh1106_i2c attribute)": [[6, "sh1106.SH1106_I2C.DEV_ADDR", false]], "device (class in bme280)": [[2, "bme280.Device", false]], "dht12": [[3, "module-dht12", false]], "dht12 (class in dht12)": [[3, "dht12.DHT12", false]], "dhtbasei2c (class in dht12)": [[3, "dht12.DHTBaseI2C", false]], "disconnect() (in module wifi_module)": [[7, "wifi_module.disconnect", false]], "fade_in() (hw_config.pwmled method)": [[4, "hw_config.PwmLed.fade_in", false]], "fade_out() (hw_config.pwmled method)": [[4, "hw_config.PwmLed.fade_out", false]], "height (sh1106.sh1106_i2c attribute)": [[6, "sh1106.SH1106_I2C.HEIGHT", false]], "high_column_addr (sh1106.sh1106_i2c attribute)": [[6, "sh1106.SH1106_I2C.HIGH_COLUMN_ADDR", false]], "humidity() (bme280.bme280 method)": [[2, "bme280.BME280.humidity", false]], "humidity() (dht12.dht12 method)": [[3, "dht12.DHT12.humidity", false]], "hw_config": [[4, "module-hw_config", false]], "is_pressed() (hw_config.button method)": [[4, "hw_config.Button.is_pressed", false]], "lcd_hd44780": [[5, "module-lcd_hd44780", false]], "lcdhd44780 (class in lcd_hd44780)": [[5, "lcd_hd44780.LcdHd44780", false]], "led (class in hw_config)": [[4, "hw_config.Led", false]], "low_column_addr (sh1106.sh1106_i2c attribute)": [[6, "sh1106.SH1106_I2C.LOW_COLUMN_ADDR", false]], "measure() (dht12.dhtbasei2c method)": [[3, "dht12.DHTBaseI2C.measure", false]], "module": [[2, "module-bme280", false], [3, "module-dht12", false], [4, "module-hw_config", false], [5, "module-lcd_hd44780", false], [6, "module-sh1106", false], [7, "module-wifi_module", false]], "move_to() (lcd_hd44780.lcdhd44780 method)": [[5, "lcd_hd44780.LcdHd44780.move_to", false]], "off() (hw_config.pwmled method)": [[4, "hw_config.PwmLed.off", false]], "on() (hw_config.pwmled method)": [[4, "hw_config.PwmLed.on", false]], "page_address (sh1106.sh1106_i2c attribute)": [[6, "sh1106.SH1106_I2C.PAGE_ADDRESS", false]], "pages (sh1106.sh1106_i2c attribute)": [[6, "sh1106.SH1106_I2C.PAGES", false]], "poweroff() (sh1106.sh1106_i2c method)": [[6, "sh1106.SH1106_I2C.poweroff", false]], "poweron() (sh1106.sh1106_i2c method)": [[6, "sh1106.SH1106_I2C.poweron", false]], "pressure() (bme280.bme280 method)": [[2, "bme280.BME280.pressure", false]], "print_status() (in module wifi_module)": [[7, "wifi_module.print_status", false]], "pwmled (class in hw_config)": [[4, "hw_config.PwmLed", false]], "read_humidity() (bme280.bme280 method)": [[2, "bme280.BME280.read_humidity", false]], "read_pressure() (bme280.bme280 method)": [[2, "bme280.BME280.read_pressure", false]], "read_raw_humidity() (bme280.bme280 method)": [[2, "bme280.BME280.read_raw_humidity", false]], "read_raw_pressure() (bme280.bme280 method)": [[2, "bme280.BME280.read_raw_pressure", false]], "read_raw_temp() (bme280.bme280 method)": [[2, "bme280.BME280.read_raw_temp", false]], "read_temperature() (bme280.bme280 method)": [[2, "bme280.BME280.read_temperature", false]], "read_values() (bme280.bme280 method)": [[2, "bme280.BME280.read_values", false]], "read_values() (dht12.dht12 method)": [[3, "dht12.DHT12.read_values", false]], "readraw8() (bme280.device method)": [[2, "bme280.Device.readRaw8", false]], "reads16() (bme280.device method)": [[2, "bme280.Device.readS16", false]], "reads16be() (bme280.device method)": [[2, "bme280.Device.readS16BE", false]], "reads16le() (bme280.device method)": [[2, "bme280.Device.readS16LE", false]], "reads8() (bme280.device method)": [[2, "bme280.Device.readS8", false]], "readu16() (bme280.device method)": [[2, "bme280.Device.readU16", false]], "readu16be() (bme280.device method)": [[2, "bme280.Device.readU16BE", false]], "readu16le() (bme280.device method)": [[2, "bme280.Device.readU16LE", false]], "readu8() (bme280.device method)": [[2, "bme280.Device.readU8", false]], "scan() (dht12.dhtbasei2c method)": [[3, "dht12.DHTBaseI2C.scan", false]], "set_brightness() (hw_config.pwmled method)": [[4, "hw_config.PwmLed.set_brightness", false]], "sh1106": [[6, "module-sh1106", false]], "sh1106_i2c (class in sh1106)": [[6, "sh1106.SH1106_I2C", false]], "show() (sh1106.sh1106_i2c method)": [[6, "sh1106.SH1106_I2C.show", false]], "sleep() (sh1106.sh1106_i2c method)": [[6, "sh1106.SH1106_I2C.sleep", false]], "temperature() (bme280.bme280 method)": [[2, "bme280.BME280.temperature", false]], "temperature() (dht12.dht12 method)": [[3, "dht12.DHT12.temperature", false]], "toggle() (hw_config.led method)": [[4, "hw_config.Led.toggle", false]], "width (sh1106.sh1106_i2c attribute)": [[6, "sh1106.SH1106_I2C.WIDTH", false]], "wifi_module": [[7, "module-wifi_module", false]], "write() (lcd_hd44780.lcdhd44780 method)": [[5, "lcd_hd44780.LcdHd44780.write", false]], "write16() (bme280.device method)": [[2, "bme280.Device.write16", false]], "write8() (bme280.device method)": [[2, "bme280.Device.write8", false]], "write_cmd() (sh1106.sh1106_i2c method)": [[6, "sh1106.SH1106_I2C.write_cmd", false]], "write_data() (sh1106.sh1106_i2c method)": [[6, "sh1106.SH1106_I2C.write_data", false]], "writeraw8() (bme280.device method)": [[2, "bme280.Device.writeRaw8", false]]}, "objects": {"": [[2, 0, 0, "-", "bme280"], [3, 0, 0, "-", "dht12"], [4, 0, 0, "-", "hw_config"], [5, 0, 0, "-", "lcd_hd44780"], [6, 0, 0, "-", "sh1106"], [7, 0, 0, "-", "wifi_module"]], "bme280": [[2, 1, 1, "", "BME280"], [2, 1, 1, "", "Device"], [2, 3, 1, "", "demo"]], "bme280.BME280": [[2, 2, 1, "", "altitude"], [2, 2, 1, "", "humidity"], [2, 2, 1, "", "pressure"], [2, 2, 1, "", "read_humidity"], [2, 2, 1, "", "read_pressure"], [2, 2, 1, "", "read_raw_humidity"], [2, 2, 1, "", "read_raw_pressure"], [2, 2, 1, "", "read_raw_temp"], [2, 2, 1, "", "read_temperature"], [2, 2, 1, "", "read_values"], [2, 2, 1, "", "temperature"]], "bme280.Device": [[2, 2, 1, "", "readRaw8"], [2, 2, 1, "", "readS16"], [2, 2, 1, "", "readS16BE"], [2, 2, 1, "", "readS16LE"], [2, 2, 1, "", "readS8"], [2, 2, 1, "", "readU16"], [2, 2, 1, "", "readU16BE"], [2, 2, 1, "", "readU16LE"], [2, 2, 1, "", "readU8"], [2, 2, 1, "", "write16"], [2, 2, 1, "", "write8"], [2, 2, 1, "", "writeRaw8"]], "dht12": [[3, 1, 1, "", "DHT12"], [3, 1, 1, "", "DHTBaseI2C"]], "dht12.DHT12": [[3, 2, 1, "", "humidity"], [3, 2, 1, "", "read_values"], [3, 2, 1, "", "temperature"]], "dht12.DHTBaseI2C": [[3, 2, 1, "", "measure"], [3, 2, 1, "", "scan"]], "hw_config": [[4, 1, 1, "", "Button"], [4, 1, 1, "", "Led"], [4, 1, 1, "", "PwmLed"], [4, 3, 1, "", "demo"]], "hw_config.Button": [[4, 2, 1, "", "is_pressed"]], "hw_config.Led": [[4, 2, 1, "", "blink"], [4, 2, 1, "", "toggle"]], "hw_config.PwmLed": [[4, 2, 1, "", "fade_in"], [4, 2, 1, "", "fade_out"], [4, 2, 1, "", "off"], [4, 2, 1, "", "on"], [4, 2, 1, "", "set_brightness"]], "lcd_hd44780": [[5, 1, 1, "", "LcdHd44780"], [5, 3, 1, "", "demo"]], "lcd_hd44780.LcdHd44780": [[5, 2, 1, "", "command"], [5, 2, 1, "", "custom_char"], [5, 2, 1, "", "data"], [5, 2, 1, "", "move_to"], [5, 2, 1, "", "write"]], "sh1106": [[6, 1, 1, "", "SH1106_I2C"], [6, 3, 1, "", "demo"]], "sh1106.SH1106_I2C": [[6, 4, 1, "", "DEV_ADDR"], [6, 4, 1, "", "HEIGHT"], [6, 4, 1, "", "HIGH_COLUMN_ADDR"], [6, 4, 1, "", "LOW_COLUMN_ADDR"], [6, 4, 1, "", "PAGES"], [6, 4, 1, "", "PAGE_ADDRESS"], [6, 4, 1, "", "WIDTH"], [6, 2, 1, "", "contrast"], [6, 2, 1, "", "poweroff"], [6, 2, 1, "", "poweron"], [6, 2, 1, "", "show"], [6, 2, 1, "", "sleep"], [6, 2, 1, "", "write_cmd"], [6, 2, 1, "", "write_data"]], "wifi_module": [[7, 3, 1, "", "connect"], [7, 3, 1, "", "disconnect"], [7, 3, 1, "", "print_status"]]}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "function", "Python function"], "4": ["py", "attribute", "Python attribute"]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:function", "4": "py:attribute"}, "terms": {"": [3, 5, 6], "0": [0, 2, 3, 4, 5, 6], "01": 2, "02": [3, 6, 7], "06": 7, "09": 4, "0x5c": 3, "1": [0, 2, 4, 5], "10": [3, 4, 5, 6], "100": 4, "1013": 2, "11": [0, 3, 4, 5, 6, 7], "118": 2, "12": 7, "128": 6, "13": 5, "14": 7, "16": [2, 6], "17": [5, 7], "176": 6, "2": [4, 5], "20": 5, "2023": [3, 5, 6, 7], "2024": [3, 4, 5, 6, 7], "2025": 0, "21": [3, 6], "22": [3, 6], "25": [2, 5], "255": 6, "26": [4, 5], "27": [5, 6], "28": 4, "3": [4, 5], "40": 6, "400_000": 6, "5": [3, 4, 5], "50": 6, "60": 6, "64": 6, "7": 5, "8": [2, 5, 6], "9": 5, "92": 3, "A": [3, 4, 5, 6], "If": [3, 7], "It": [3, 5, 6], "The": [3, 4, 5, 6, 7], "To": 1, "activ": 4, "ad": [3, 4, 5, 6, 7], "add": 6, "addr": [2, 3, 5], "address": [2, 3, 5], "adjust": 4, "agnihotri": 7, "al": [5, 6], "allow": [2, 4, 6], "alreadi": 2, "altitud": 2, "an": [2, 3, 4, 5, 6], "ani": [4, 6, 7], "aosong": 3, "approxim": 2, "arg": [4, 6], "arrai": [2, 6], "assum": 2, "attempt": 7, "avail": [3, 5], "base": [0, 2, 3, 4], "basic": 0, "been": 2, "between": 4, "big": 2, "bit": 2, "blink": 4, "bme280": 0, "board": 1, "both": 3, "bright": 4, "bu": [2, 3], "buf": 3, "buffer": [3, 6], "button": 4, "byte": [2, 3, 5, 6], "c": 3, "calcul": 3, "causer": 3, "celsiu": [2, 3], "cgram": 5, "charact": 5, "charmap": 5, "check": [3, 4, 7], "checksum": 3, "chen": [5, 6], "class": [2, 4, 5, 6], "clone": 1, "cmd": [5, 6], "column": 5, "com": 1, "command": [5, 6], "comment": [3, 4, 5, 6, 7], "common": 4, "commun": [2, 3], "compens": 2, "compon": 0, "connect": [4, 7], "contain": [3, 6], "contrast": 6, "control": [4, 5, 6], "correspond": 7, "corrupt": 3, "cours": 1, "creat": [3, 4, 5, 6, 7], "current": [3, 4, 6], "cursor": 5, "custom": 5, "custom_char": 5, "cycl": 4, "d": 5, "d4": 5, "d5": 5, "d6": 5, "d7": 5, "data": [3, 5, 6], "date": 0, "deactiv": 7, "decreas": 4, "default": [2, 3, 4], "degre": [2, 3], "demo": [2, 4, 5, 6], "demonstr": [2, 4, 5, 6], "detect": 3, "dev_addr": 6, "devic": [2, 7], "dht1": 3, "dht12": 0, "dhtbasei2c": 3, "disconnect": 7, "displai": [5, 6], "document": [4, 5, 6], "draw": 6, "driver": 0, "durat": 4, "e": [3, 5], "each": [4, 5], "effect": 4, "els": 7, "enabl": 6, "endian": 2, "engin": 7, "ensur": 3, "error": 3, "esp": 1, "esp32": [6, 7], "esp8266": 7, "et": [5, 6], "exampl": 1, "exce": 7, "except": 3, "extend": 3, "f": 3, "fade": 4, "fade_in": 4, "fade_out": 4, "fail": [3, 7], "fals": [4, 7], "feb": 0, "fi": 0, "file": [4, 5, 6], "firmwar": 1, "first": 2, "float": 3, "folder": 1, "follow": 1, "found": 3, "framebuf": 6, "framebuff": 6, "freq": 6, "from": [1, 2, 3, 4, 5, 6, 7], "fryza": [1, 3, 4, 5, 6, 7], "function": [6, 7], "garag": 7, "gener": 5, "get": [1, 2], "git": 1, "github": 1, "gpio": 4, "gradual": 4, "ha": 2, "handl": 3, "hardwar": 1, "hd44780": 0, "height": 6, "hello": 5, "high_column_addr": 6, "hpa": 2, "http": 1, "human": 7, "humid": [2, 3], "hw_config": 4, "i": [0, 3, 6, 7], "i2c": [2, 3, 6], "id": 1, "imag": 6, "import": [3, 4, 5, 6, 7], "includ": 3, "increas": 4, "indic": 3, "inherit": 6, "init": 6, "initi": [3, 4, 5, 6, 7], "input": 4, "inspir": 5, "instal": 0, "instanc": 3, "integr": 3, "interfac": [3, 5, 6, 7], "interpret": 3, "is_press": 4, "its": 3, "kwarg": [2, 4, 6], "lcd": 0, "lcd_hd44780": 5, "lcdhd44780": 5, "least": 2, "led": 4, "level": [2, 3, 4], "line": 5, "list": 5, "littl": 2, "little_endian": 2, "locat": 5, "logic": 4, "low": [3, 4], "low_column_addr": 6, "machin": [3, 5], "manag": 4, "measur": 3, "memori": 3, "messag": [5, 7], "meter": 2, "method": [3, 4, 5, 6, 7], "microcontrollerslab": 5, "micropython": [1, 3, 5, 6, 7], "mike": 3, "mode": [2, 6, 7], "modul": [3, 4, 5, 6, 7], "move": 5, "move_to": 5, "neg": 3, "network": 7, "nikhil": 7, "none": 2, "number": [4, 5], "o": 0, "object": [2, 3, 4, 5, 7], "off": [4, 6], "ol": 0, "one": 5, "order": 2, "otherwis": 4, "out": [4, 7], "output": 4, "over": [3, 6], "page": 6, "page_address": 6, "paramet": [4, 5, 6, 7], "pascal": 2, "password": 7, "pattern": 5, "peppe8o": 5, "percent": 2, "percentag": [3, 4], "perform": 3, "pi": [5, 6], "pico": [5, 6], "pin": [3, 4, 5, 6], "pin_numb": 4, "pixel": [5, 6], "point": 3, "posit": [3, 5], "potenti": 3, "power": 6, "poweroff": 6, "poweron": 6, "prefix": 7, "press": 4, "pressur": 2, "previous": 3, "print": [3, 4, 7], "print_statu": 7, "program": [5, 6], "protocol": 6, "provid": [3, 4, 5, 6, 7], "pull": 4, "put": 6, "pwm": 4, "pwmled": 4, "pypi": 3, "r": 5, "rais": 3, "ram": 5, "raspberri": [5, 6], "raw": 2, "read": [2, 3], "read_humid": 2, "read_pressur": 2, "read_raw_humid": 2, "read_raw_pressur": 2, "read_raw_temp": 2, "read_temperatur": 2, "read_valu": [2, 3], "readabl": 7, "readraw8": 2, "reads16": 2, "reads16b": 2, "reads16l": 2, "reads8": 2, "readu16": 2, "readu16b": 2, "readu16l": 2, "readu8": 2, "refresh": 6, "regist": [2, 5], "releas": [0, 4, 5, 6], "render": 6, "repositori": 1, "repres": 5, "resistor": 4, "retriev": [3, 7], "return": [2, 3, 4, 7], "run": 1, "sampl": 5, "scan": 3, "scl": [3, 6], "screen": [5, 6], "script": 1, "sda": [3, 6], "sea_level_pressure_hpa": 2, "second": 4, "self": 3, "send": 5, "sensor": 0, "sensor_addr": 3, "sent": 6, "set": [4, 6], "set_bright": 4, "sh1106": 0, "sh1106_i2c": 6, "should": 4, "show": 6, "showcas": 6, "shujen": [5, 6], "sign": 2, "signific": 2, "simpl": 5, "sleep": 6, "so": 6, "some": 6, "sourc": [2, 3, 4, 5, 6, 7], "specifi": [2, 3, 4, 5, 7], "sphinx": [3, 4, 5, 6, 7], "spi": 6, "ssid": 7, "sta_if": 7, "start": 1, "state": 4, "statement": 7, "station": 7, "statu": 7, "step": 1, "store": [3, 5], "str": 7, "string": 5, "style": [4, 5, 6], "successfulli": [3, 7], "support": [4, 5], "temperatur": [2, 3], "termin": 7, "text": [5, 6], "thi": [3, 4, 5, 6, 7], "thonni": 1, "time": [4, 5, 7], "timeout": 7, "toggl": 4, "toma": [1, 3, 4, 5, 6, 7], "total": 4, "true": [2, 4, 7], "try": 3, "tupl": 3, "turn": [4, 6], "two": 5, "uncompens": 2, "unsign": 2, "up": [4, 6], "updat": 6, "us": [3, 4, 6, 7], "usag": [2, 4, 5, 6], "user": 6, "val": [5, 6], "valid": 3, "valu": [2, 3, 6], "wake": 6, "well": 6, "which": 3, "whose": 7, "wi": 0, "width": 6, "wifi": 7, "wifi_modul": 7, "without": 2, "wlan": 7, "world": 5, "write": [2, 5, 6], "write16": 2, "write8": 2, "write_cmd": 6, "write_data": 6, "writeraw8": 2, "x": 6, "y": 6, "your": 1, "your_password": 7, "your_ssid": 7}, "titles": ["Welcome to MicroPython course\u2019s documentation!", "Installation", "BME280 sensor", "DHT12 sensor driver", "Basic I/O components", "HD44780-based LCD driver", "SH1106-based OLED driver", "Wi-Fi"], "titleterms": {"": 0, "attribut": 3, "author": [3, 4, 5, 6, 7], "base": [5, 6], "basic": 4, "bme280": 2, "class": 3, "compon": 4, "cours": 0, "dht12": 3, "document": 0, "driver": [3, 5, 6], "exampl": [3, 4, 5, 6, 7], "fi": 7, "gener": 0, "hd44780": 5, "histori": [3, 4, 5, 6, 7], "i": 4, "instal": 1, "lcd": 5, "micropython": 0, "modif": [3, 4, 5, 6, 7], "modul": 0, "o": 4, "ol": 6, "sensor": [2, 3], "sh1106": 6, "welcom": 0, "wi": 7}})
\ No newline at end of file