MediaWiki API result

This is the HTML representation of the JSON format. HTML is good for debugging, but is unsuitable for application use.

Specify the format parameter to change the output format. To see the non-HTML representation of the JSON format, set format=json.

See the complete documentation, or the API help for more information.

{
    "batchcomplete": "",
    "continue": {
        "gapcontinue": "Sketching_with_Hardware_MicroPython_Edition_Part_I",
        "continue": "gapcontinue||"
    },
    "warnings": {
        "main": {
            "*": "Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
        },
        "revisions": {
            "*": "Because \"rvslots\" was not specified, a legacy format has been used for the output. This format is deprecated, and in the future the new format will always be used."
        }
    },
    "query": {
        "pages": {
            "150": {
                "pageid": 150,
                "ns": 0,
                "title": "Resistor",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "Resistors have different values measured in Ohm.\n* Ohm is sometimes also shortcutted as R\n* Kilo-Ohm is sometimes also shortcutted as K\n* Mega-Ohm is sometimes also shortcutted as M\n\nThe resistors are color-coded. The colors tell the resistance value (e.g. see https://www.make-it.ca/resistor-color-code-calculator/). You can also measure the resistance with the [[Multimeter]].\n\n[[File:Resistors.JPG|500px]]"
                    }
                ]
            },
            "200": {
                "pageid": 200,
                "ns": 0,
                "title": "SG90 Servo",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "= IMPORTANT =\n'''In many computers the current is not enough to drive the servo!!!'''\n\n'''If it does not work, keeps disconnecting, or rebooting the ESP the power is not sufficent and you need  a capacitor ot an extra power supply.'''\n\nSee the last section below ([[SG90 Servo#Power Issues]]) and the video for details how to do this.\n\n= Schematic - Connecting the SG90 =\n\n[[File:Servo00.jpg|500px]]\n\n[[File:Servo01.jpg|500px]]\n\n= Code Examples ESP8266 =\n\n= Basic control =\nAssuming the servo is connected to Pin 5.\n\n<syntaxhighlight lang=\"python\" line='line'>\nfrom machine import Pin,PWM\nfrom time import sleep\n\nservoPin = Pin(5, Pin.OUT)\npwm =  PWM(servoPin, freq=50)\npwm.deinit() # workaround to reset PWM\npwm = PWM(servoPin, freq=50)\n\nval = 50\n\nwhile True:\n  pwm.duty(val)\n  val = val + 1\n  if val>100:\n    val = 50\n  print(val)\n  sleep(0.05)\n</syntaxhighlight>\n\n= Controlling the servo with a Poti =\nA0 is the analog input with 10 bit resolution. It reads the analog value every second and print it to the console and sets the servo based on the analog input.\n\n<syntaxhighlight lang=\"python\" line='line'>\nfrom machine import Pin, ADC, PWM\nfrom time import sleep\n\nanalogPin = ADC(0)\nservoPin = Pin(5, Pin.OUT)\npwm =  PWM(servoPin, freq=50)\npwm.deinit()\npwm = PWM(servoPin, freq=50)\n\nwhile True:\n  analogVal = analogPin.read()\n  pwm.duty(int(analogVal/10))\n  print(analogVal)\n  sleep(1)\n</syntaxhighlight>\n\n\n= Related Tutorial Videos =\n== PWM Output: connecting a servo and and LED ==\n\n<youtube>XovIHYo7s1A</youtube>\n\n<!-- old video <youtube>_4bXk8JjQSk</youtube> -->\n\n= Power Issues =\nWhen connecting the servo to the ESP32 or ESP8266 it may not work at all, may restart at random times, or may move to a wrong angle. This is typically a power issue. The ESP-board is and the USB-output of the computer does not provide enough power. \nThere are two fixes: adding a big capacitor (e.g. electrolytic capacitor [[Elko]] 2000 uF) or adding an external power source (e.g. [[USB-Power]]). The external power source is the better solution.\n\nHave a look at the video for details.\n\n== Adding a Capacitor ==\n\n[[File:PowerElko.JPG|400px]]\n\n== Connecting an external Power Source ==  \n\n[[File:PowerUSB.JPG|400px]]\n[[File:PowerUSB-module.JPG|270px]]\n\n[[File:PowerUSB-setup.JPG|400px]]"
                    }
                ]
            }
        }
    }
}