5 <link rel="stylesheet" href="styles.css"> |
5 <link rel="stylesheet" href="styles.css"> |
6 </head> |
6 </head> |
7 <body> |
7 <body> |
8 <a NAME="top" ID="top"></a> |
8 <a NAME="top" ID="top"></a> |
9 <h1>eric7.MicroPython.Devices.CircuitPythonDevices</h1> |
9 <h1>eric7.MicroPython.Devices.CircuitPythonDevices</h1> |
10 |
|
11 <p> |
10 <p> |
12 Module implementing the device interface class for CircuitPython boards. |
11 Module implementing the device interface class for CircuitPython boards. |
13 </p> |
12 </p> |
|
13 |
14 <h3>Global Attributes</h3> |
14 <h3>Global Attributes</h3> |
15 |
|
16 <table> |
15 <table> |
17 <tr><td>None</td></tr> |
16 <tr><td>None</td></tr> |
18 </table> |
17 </table> |
|
18 |
19 <h3>Classes</h3> |
19 <h3>Classes</h3> |
20 |
|
21 <table> |
20 <table> |
22 |
|
23 <tr> |
21 <tr> |
24 <td><a href="#CircuitPythonDevice">CircuitPythonDevice</a></td> |
22 <td><a href="#CircuitPythonDevice">CircuitPythonDevice</a></td> |
25 <td>Class implementing the device for CircuitPython boards.</td> |
23 <td>Class implementing the device for CircuitPython boards.</td> |
26 </tr> |
24 </tr> |
27 </table> |
25 </table> |
|
26 |
28 <h3>Functions</h3> |
27 <h3>Functions</h3> |
29 |
|
30 <table> |
28 <table> |
31 |
|
32 <tr> |
29 <tr> |
33 <td><a href="#createDevice">createDevice</a></td> |
30 <td><a href="#createDevice">createDevice</a></td> |
34 <td>Function to instantiate a MicroPython device object.</td> |
31 <td>Function to instantiate a MicroPython device object.</td> |
35 </tr> |
32 </tr> |
36 </table> |
33 </table> |
|
34 |
37 <hr /> |
35 <hr /> |
38 <hr /> |
36 <hr /> |
39 <a NAME="CircuitPythonDevice" ID="CircuitPythonDevice"></a> |
37 <a NAME="CircuitPythonDevice" ID="CircuitPythonDevice"></a> |
40 <h2>CircuitPythonDevice</h2> |
38 <h2>CircuitPythonDevice</h2> |
41 |
|
42 <p> |
39 <p> |
43 Class implementing the device for CircuitPython boards. |
40 Class implementing the device for CircuitPython boards. |
44 </p> |
41 </p> |
|
42 |
45 <h3>Derived from</h3> |
43 <h3>Derived from</h3> |
46 BaseDevice |
44 BaseDevice |
47 <h3>Class Attributes</h3> |
45 <h3>Class Attributes</h3> |
48 |
|
49 <table> |
46 <table> |
50 <tr><td>DeviceVolumeName</td></tr> |
47 <tr><td>DeviceVolumeName</td></tr> |
51 </table> |
48 </table> |
|
49 |
52 <h3>Class Methods</h3> |
50 <h3>Class Methods</h3> |
53 |
|
54 <table> |
51 <table> |
55 <tr><td>None</td></tr> |
52 <tr><td>None</td></tr> |
56 </table> |
53 </table> |
|
54 |
57 <h3>Methods</h3> |
55 <h3>Methods</h3> |
58 |
|
59 <table> |
56 <table> |
60 |
|
61 <tr> |
57 <tr> |
62 <td><a href="#CircuitPythonDevice.__init__">CircuitPythonDevice</a></td> |
58 <td><a href="#CircuitPythonDevice.__init__">CircuitPythonDevice</a></td> |
63 <td>Constructor</td> |
59 <td>Constructor</td> |
64 </tr> |
60 </tr> |
65 <tr> |
61 <tr> |
325 <tr> |
321 <tr> |
326 <td><a href="#CircuitPythonDevice.writeLanAutoConnect">writeLanAutoConnect</a></td> |
322 <td><a href="#CircuitPythonDevice.writeLanAutoConnect">writeLanAutoConnect</a></td> |
327 <td>Public method to generate a script and associated configuration to connect the device to the LAN during boot time.</td> |
323 <td>Public method to generate a script and associated configuration to connect the device to the LAN during boot time.</td> |
328 </tr> |
324 </tr> |
329 </table> |
325 </table> |
|
326 |
330 <h3>Static Methods</h3> |
327 <h3>Static Methods</h3> |
331 |
|
332 <table> |
328 <table> |
333 <tr><td>None</td></tr> |
329 <tr><td>None</td></tr> |
334 </table> |
330 </table> |
335 |
331 |
|
332 |
336 <a NAME="CircuitPythonDevice.__init__" ID="CircuitPythonDevice.__init__"></a> |
333 <a NAME="CircuitPythonDevice.__init__" ID="CircuitPythonDevice.__init__"></a> |
337 <h4>CircuitPythonDevice (Constructor)</h4> |
334 <h4>CircuitPythonDevice (Constructor)</h4> |
338 <b>CircuitPythonDevice</b>(<i>microPythonWidget, deviceType, boardName, vid=0, pid=0, hasWorkspace=True, parent=None, </i>) |
335 <b>CircuitPythonDevice</b>(<i>microPythonWidget, deviceType, boardName, vid=0, pid=0, hasWorkspace=True, parent=None, </i>) |
339 |
|
340 <p> |
336 <p> |
341 Constructor |
337 Constructor |
342 </p> |
338 </p> |
|
339 |
343 <dl> |
340 <dl> |
344 |
341 |
345 <dt><i>microPythonWidget</i> (MicroPythonWidget)</dt> |
342 <dt><i>microPythonWidget</i> (MicroPythonWidget)</dt> |
346 <dd> |
343 <dd> |
347 reference to the main MicroPython widget |
344 reference to the main MicroPython widget |
373 </dd> |
370 </dd> |
374 </dl> |
371 </dl> |
375 <a NAME="CircuitPythonDevice.__aboutToShowLibraryMenu" ID="CircuitPythonDevice.__aboutToShowLibraryMenu"></a> |
372 <a NAME="CircuitPythonDevice.__aboutToShowLibraryMenu" ID="CircuitPythonDevice.__aboutToShowLibraryMenu"></a> |
376 <h4>CircuitPythonDevice.__aboutToShowLibraryMenu</h4> |
373 <h4>CircuitPythonDevice.__aboutToShowLibraryMenu</h4> |
377 <b>__aboutToShowLibraryMenu</b>(<i></i>) |
374 <b>__aboutToShowLibraryMenu</b>(<i></i>) |
378 |
|
379 <p> |
375 <p> |
380 Private slot to populate the 'Library Management' menu. |
376 Private slot to populate the 'Library Management' menu. |
381 </p> |
377 </p> |
|
378 |
382 <a NAME="CircuitPythonDevice.__activateBootloader" ID="CircuitPythonDevice.__activateBootloader"></a> |
379 <a NAME="CircuitPythonDevice.__activateBootloader" ID="CircuitPythonDevice.__activateBootloader"></a> |
383 <h4>CircuitPythonDevice.__activateBootloader</h4> |
380 <h4>CircuitPythonDevice.__activateBootloader</h4> |
384 <b>__activateBootloader</b>(<i></i>) |
381 <b>__activateBootloader</b>(<i></i>) |
385 |
|
386 <p> |
382 <p> |
387 Private slot to switch the board into 'bootloader' mode. |
383 Private slot to switch the board into 'bootloader' mode. |
388 </p> |
384 </p> |
|
385 |
389 <a NAME="CircuitPythonDevice.__activateUF2Boot" ID="CircuitPythonDevice.__activateUF2Boot"></a> |
386 <a NAME="CircuitPythonDevice.__activateUF2Boot" ID="CircuitPythonDevice.__activateUF2Boot"></a> |
390 <h4>CircuitPythonDevice.__activateUF2Boot</h4> |
387 <h4>CircuitPythonDevice.__activateUF2Boot</h4> |
391 <b>__activateUF2Boot</b>(<i></i>) |
388 <b>__activateUF2Boot</b>(<i></i>) |
392 |
|
393 <p> |
389 <p> |
394 Private slot to switch the board into 'UF2 Boot' mode. |
390 Private slot to switch the board into 'UF2 Boot' mode. |
395 </p> |
391 </p> |
|
392 |
396 <a NAME="CircuitPythonDevice.__cpyVersionResponse" ID="CircuitPythonDevice.__cpyVersionResponse"></a> |
393 <a NAME="CircuitPythonDevice.__cpyVersionResponse" ID="CircuitPythonDevice.__cpyVersionResponse"></a> |
397 <h4>CircuitPythonDevice.__cpyVersionResponse</h4> |
394 <h4>CircuitPythonDevice.__cpyVersionResponse</h4> |
398 <b>__cpyVersionResponse</b>(<i>reply</i>) |
395 <b>__cpyVersionResponse</b>(<i>reply</i>) |
399 |
|
400 <p> |
396 <p> |
401 Private slot handling the response of the latest version request. |
397 Private slot handling the response of the latest version request. |
402 </p> |
398 </p> |
|
399 |
403 <dl> |
400 <dl> |
404 |
401 |
405 <dt><i>reply</i> (QNetworkReply)</dt> |
402 <dt><i>reply</i> (QNetworkReply)</dt> |
406 <dd> |
403 <dd> |
407 reference to the reply object |
404 reference to the reply object |
408 </dd> |
405 </dd> |
409 </dl> |
406 </dl> |
410 <a NAME="CircuitPythonDevice.__createCPyMenu" ID="CircuitPythonDevice.__createCPyMenu"></a> |
407 <a NAME="CircuitPythonDevice.__createCPyMenu" ID="CircuitPythonDevice.__createCPyMenu"></a> |
411 <h4>CircuitPythonDevice.__createCPyMenu</h4> |
408 <h4>CircuitPythonDevice.__createCPyMenu</h4> |
412 <b>__createCPyMenu</b>(<i></i>) |
409 <b>__createCPyMenu</b>(<i></i>) |
413 |
|
414 <p> |
410 <p> |
415 Private method to create the CircuitPython submenu. |
411 Private method to create the CircuitPython submenu. |
416 </p> |
412 </p> |
|
413 |
417 <a NAME="CircuitPythonDevice.__createFlashMenus" ID="CircuitPythonDevice.__createFlashMenus"></a> |
414 <a NAME="CircuitPythonDevice.__createFlashMenus" ID="CircuitPythonDevice.__createFlashMenus"></a> |
418 <h4>CircuitPythonDevice.__createFlashMenus</h4> |
415 <h4>CircuitPythonDevice.__createFlashMenus</h4> |
419 <b>__createFlashMenus</b>(<i></i>) |
416 <b>__createFlashMenus</b>(<i></i>) |
420 |
|
421 <p> |
417 <p> |
422 Private method to create the various menus to flash a CircuitPython firmware. |
418 Private method to create the various menus to flash a CircuitPython firmware. |
423 </p> |
419 </p> |
|
420 |
424 <dl> |
421 <dl> |
425 <dt>Return:</dt> |
422 <dt>Return:</dt> |
426 <dd> |
423 <dd> |
427 reference to the created top level flash menu |
424 reference to the created top level flash menu |
428 </dd> |
425 </dd> |
453 </dd> |
450 </dd> |
454 </dl> |
451 </dl> |
455 <a NAME="CircuitPythonDevice.__esp32EraseFlash" ID="CircuitPythonDevice.__esp32EraseFlash"></a> |
452 <a NAME="CircuitPythonDevice.__esp32EraseFlash" ID="CircuitPythonDevice.__esp32EraseFlash"></a> |
456 <h4>CircuitPythonDevice.__esp32EraseFlash</h4> |
453 <h4>CircuitPythonDevice.__esp32EraseFlash</h4> |
457 <b>__esp32EraseFlash</b>(<i></i>) |
454 <b>__esp32EraseFlash</b>(<i></i>) |
458 |
|
459 <p> |
455 <p> |
460 Private slot to erase the flash of an ESP32 device. |
456 Private slot to erase the flash of an ESP32 device. |
461 </p> |
457 </p> |
|
458 |
462 <a NAME="CircuitPythonDevice.__esp32FlashAddons" ID="CircuitPythonDevice.__esp32FlashAddons"></a> |
459 <a NAME="CircuitPythonDevice.__esp32FlashAddons" ID="CircuitPythonDevice.__esp32FlashAddons"></a> |
463 <h4>CircuitPythonDevice.__esp32FlashAddons</h4> |
460 <h4>CircuitPythonDevice.__esp32FlashAddons</h4> |
464 <b>__esp32FlashAddons</b>(<i></i>) |
461 <b>__esp32FlashAddons</b>(<i></i>) |
465 |
|
466 <p> |
462 <p> |
467 Private slot to flash additional firmware to an ESP32 device. |
463 Private slot to flash additional firmware to an ESP32 device. |
468 </p> |
464 </p> |
|
465 |
469 <a NAME="CircuitPythonDevice.__esp32FlashPython" ID="CircuitPythonDevice.__esp32FlashPython"></a> |
466 <a NAME="CircuitPythonDevice.__esp32FlashPython" ID="CircuitPythonDevice.__esp32FlashPython"></a> |
470 <h4>CircuitPythonDevice.__esp32FlashPython</h4> |
467 <h4>CircuitPythonDevice.__esp32FlashPython</h4> |
471 <b>__esp32FlashPython</b>(<i></i>) |
468 <b>__esp32FlashPython</b>(<i></i>) |
472 |
|
473 <p> |
469 <p> |
474 Private slot to flash a MicroPython or CircuitPython firmware to an ESP32 |
470 Private slot to flash a MicroPython or CircuitPython firmware to an ESP32 |
475 device. |
471 device. |
476 </p> |
472 </p> |
|
473 |
477 <a NAME="CircuitPythonDevice.__findDeviceDirectories" ID="CircuitPythonDevice.__findDeviceDirectories"></a> |
474 <a NAME="CircuitPythonDevice.__findDeviceDirectories" ID="CircuitPythonDevice.__findDeviceDirectories"></a> |
478 <h4>CircuitPythonDevice.__findDeviceDirectories</h4> |
475 <h4>CircuitPythonDevice.__findDeviceDirectories</h4> |
479 <b>__findDeviceDirectories</b>(<i>directories</i>) |
476 <b>__findDeviceDirectories</b>(<i>directories</i>) |
480 |
|
481 <p> |
477 <p> |
482 Private method to find the device directories associated with the |
478 Private method to find the device directories associated with the |
483 current board name. |
479 current board name. |
484 </p> |
480 </p> |
|
481 |
485 <dl> |
482 <dl> |
486 |
483 |
487 <dt><i>directories</i> (list of str)</dt> |
484 <dt><i>directories</i> (list of str)</dt> |
488 <dd> |
485 <dd> |
489 list of directories to be checked |
486 list of directories to be checked |
502 </dd> |
499 </dd> |
503 </dl> |
500 </dl> |
504 <a NAME="CircuitPythonDevice.__findWorkspace" ID="CircuitPythonDevice.__findWorkspace"></a> |
501 <a NAME="CircuitPythonDevice.__findWorkspace" ID="CircuitPythonDevice.__findWorkspace"></a> |
505 <h4>CircuitPythonDevice.__findWorkspace</h4> |
502 <h4>CircuitPythonDevice.__findWorkspace</h4> |
506 <b>__findWorkspace</b>(<i>silent=False</i>) |
503 <b>__findWorkspace</b>(<i>silent=False</i>) |
507 |
|
508 <p> |
504 <p> |
509 Private method to find the workspace directory. |
505 Private method to find the workspace directory. |
510 </p> |
506 </p> |
|
507 |
511 <dl> |
508 <dl> |
512 |
509 |
513 <dt><i>silent</i> (bool (optional))</dt> |
510 <dt><i>silent</i> (bool (optional))</dt> |
514 <dd> |
511 <dd> |
515 flag indicating silent operations (defaults to False) |
512 flag indicating silent operations (defaults to False) |
528 </dd> |
525 </dd> |
529 </dl> |
526 </dl> |
530 <a NAME="CircuitPythonDevice.__flashCircuitPython" ID="CircuitPythonDevice.__flashCircuitPython"></a> |
527 <a NAME="CircuitPythonDevice.__flashCircuitPython" ID="CircuitPythonDevice.__flashCircuitPython"></a> |
531 <h4>CircuitPythonDevice.__flashCircuitPython</h4> |
528 <h4>CircuitPythonDevice.__flashCircuitPython</h4> |
532 <b>__flashCircuitPython</b>(<i></i>) |
529 <b>__flashCircuitPython</b>(<i></i>) |
533 |
|
534 <p> |
530 <p> |
535 Private slot to flash a CircuitPython firmware to a device supporting UF2. |
531 Private slot to flash a CircuitPython firmware to a device supporting UF2. |
536 </p> |
532 </p> |
|
533 |
537 <a NAME="CircuitPythonDevice.__installLibraryFiles" ID="CircuitPythonDevice.__installLibraryFiles"></a> |
534 <a NAME="CircuitPythonDevice.__installLibraryFiles" ID="CircuitPythonDevice.__installLibraryFiles"></a> |
538 <h4>CircuitPythonDevice.__installLibraryFiles</h4> |
535 <h4>CircuitPythonDevice.__installLibraryFiles</h4> |
539 <b>__installLibraryFiles</b>(<i>packageMode=False</i>) |
536 <b>__installLibraryFiles</b>(<i>packageMode=False</i>) |
540 |
|
541 <p> |
537 <p> |
542 Private slot to install Python files into the onboard library. |
538 Private slot to install Python files into the onboard library. |
543 </p> |
539 </p> |
|
540 |
544 <dl> |
541 <dl> |
545 |
542 |
546 <dt><i>packageMode</i> (bool (optional))</dt> |
543 <dt><i>packageMode</i> (bool (optional))</dt> |
547 <dd> |
544 <dd> |
548 flag indicating to install a library package |
545 flag indicating to install a library package |
550 </dd> |
547 </dd> |
551 </dl> |
548 </dl> |
552 <a NAME="CircuitPythonDevice.__modifySettings" ID="CircuitPythonDevice.__modifySettings"></a> |
549 <a NAME="CircuitPythonDevice.__modifySettings" ID="CircuitPythonDevice.__modifySettings"></a> |
553 <h4>CircuitPythonDevice.__modifySettings</h4> |
550 <h4>CircuitPythonDevice.__modifySettings</h4> |
554 <b>__modifySettings</b>(<i>changedEntries</i>) |
551 <b>__modifySettings</b>(<i>changedEntries</i>) |
555 |
|
556 <p> |
552 <p> |
557 Private method to modify the 'settings.toml' file as of CircuitPython 8.0.0. |
553 Private method to modify the 'settings.toml' file as of CircuitPython 8.0.0. |
558 </p> |
554 </p> |
|
555 |
559 <dl> |
556 <dl> |
560 |
557 |
561 <dt><i>changedEntries</i> (dict of {str: str})</dt> |
558 <dt><i>changedEntries</i> (dict of {str: str})</dt> |
562 <dd> |
559 <dd> |
563 dictionary containing the TOML entries to be changed |
560 dictionary containing the TOML entries to be changed |
576 </dd> |
573 </dd> |
577 </dl> |
574 </dl> |
578 <a NAME="CircuitPythonDevice.__resetDevice" ID="CircuitPythonDevice.__resetDevice"></a> |
575 <a NAME="CircuitPythonDevice.__resetDevice" ID="CircuitPythonDevice.__resetDevice"></a> |
579 <h4>CircuitPythonDevice.__resetDevice</h4> |
576 <h4>CircuitPythonDevice.__resetDevice</h4> |
580 <b>__resetDevice</b>(<i></i>) |
577 <b>__resetDevice</b>(<i></i>) |
581 |
|
582 <p> |
578 <p> |
583 Private slot to reset the connected device. |
579 Private slot to reset the connected device. |
584 </p> |
580 </p> |
|
581 |
585 <a NAME="CircuitPythonDevice.__selectDeviceVolume" ID="CircuitPythonDevice.__selectDeviceVolume"></a> |
582 <a NAME="CircuitPythonDevice.__selectDeviceVolume" ID="CircuitPythonDevice.__selectDeviceVolume"></a> |
586 <h4>CircuitPythonDevice.__selectDeviceVolume</h4> |
583 <h4>CircuitPythonDevice.__selectDeviceVolume</h4> |
587 <b>__selectDeviceVolume</b>(<i></i>) |
584 <b>__selectDeviceVolume</b>(<i></i>) |
588 |
|
589 <p> |
585 <p> |
590 Private slot to select the mounted device volume, if it could not be found |
586 Private slot to select the mounted device volume, if it could not be found |
591 automatically. |
587 automatically. |
592 </p> |
588 </p> |
|
589 |
593 <a NAME="CircuitPythonDevice.__showTeensyFlashInstructions" ID="CircuitPythonDevice.__showTeensyFlashInstructions"></a> |
590 <a NAME="CircuitPythonDevice.__showTeensyFlashInstructions" ID="CircuitPythonDevice.__showTeensyFlashInstructions"></a> |
594 <h4>CircuitPythonDevice.__showTeensyFlashInstructions</h4> |
591 <h4>CircuitPythonDevice.__showTeensyFlashInstructions</h4> |
595 <b>__showTeensyFlashInstructions</b>(<i></i>) |
592 <b>__showTeensyFlashInstructions</b>(<i></i>) |
596 |
|
597 <p> |
593 <p> |
598 Private slot to show a message box because Teensy does not support |
594 Private slot to show a message box because Teensy does not support |
599 the UF2 bootloader yet. |
595 the UF2 bootloader yet. |
600 </p> |
596 </p> |
|
597 |
601 <a NAME="CircuitPythonDevice.__startTeensyLoader" ID="CircuitPythonDevice.__startTeensyLoader"></a> |
598 <a NAME="CircuitPythonDevice.__startTeensyLoader" ID="CircuitPythonDevice.__startTeensyLoader"></a> |
602 <h4>CircuitPythonDevice.__startTeensyLoader</h4> |
599 <h4>CircuitPythonDevice.__startTeensyLoader</h4> |
603 <b>__startTeensyLoader</b>(<i></i>) |
600 <b>__startTeensyLoader</b>(<i></i>) |
604 |
|
605 <p> |
601 <p> |
606 Private slot to start the 'Teensy Loader' application. |
602 Private slot to start the 'Teensy Loader' application. |
607 </p> |
603 </p> |
608 <p> |
604 <p> |
609 Note: The application must be accessible via the application search path. |
605 Note: The application must be accessible via the application search path. |
610 </p> |
606 </p> |
|
607 |
611 <a NAME="CircuitPythonDevice.activateBluetoothInterface" ID="CircuitPythonDevice.activateBluetoothInterface"></a> |
608 <a NAME="CircuitPythonDevice.activateBluetoothInterface" ID="CircuitPythonDevice.activateBluetoothInterface"></a> |
612 <h4>CircuitPythonDevice.activateBluetoothInterface</h4> |
609 <h4>CircuitPythonDevice.activateBluetoothInterface</h4> |
613 <b>activateBluetoothInterface</b>(<i></i>) |
610 <b>activateBluetoothInterface</b>(<i></i>) |
614 |
|
615 <p> |
611 <p> |
616 Public method to activate the Bluetooth interface. |
612 Public method to activate the Bluetooth interface. |
617 </p> |
613 </p> |
|
614 |
618 <dl> |
615 <dl> |
619 <dt>Return:</dt> |
616 <dt>Return:</dt> |
620 <dd> |
617 <dd> |
621 flag indicating the new state of the Bluetooth interface |
618 flag indicating the new state of the Bluetooth interface |
622 </dd> |
619 </dd> |
635 </dd> |
632 </dd> |
636 </dl> |
633 </dl> |
637 <a NAME="CircuitPythonDevice.addDeviceMenuEntries" ID="CircuitPythonDevice.addDeviceMenuEntries"></a> |
634 <a NAME="CircuitPythonDevice.addDeviceMenuEntries" ID="CircuitPythonDevice.addDeviceMenuEntries"></a> |
638 <h4>CircuitPythonDevice.addDeviceMenuEntries</h4> |
635 <h4>CircuitPythonDevice.addDeviceMenuEntries</h4> |
639 <b>addDeviceMenuEntries</b>(<i>menu</i>) |
636 <b>addDeviceMenuEntries</b>(<i>menu</i>) |
640 |
|
641 <p> |
637 <p> |
642 Public method to add device specific entries to the given menu. |
638 Public method to add device specific entries to the given menu. |
643 </p> |
639 </p> |
|
640 |
644 <dl> |
641 <dl> |
645 |
642 |
646 <dt><i>menu</i> (QMenu)</dt> |
643 <dt><i>menu</i> (QMenu)</dt> |
647 <dd> |
644 <dd> |
648 reference to the context menu |
645 reference to the context menu |
649 </dd> |
646 </dd> |
650 </dl> |
647 </dl> |
651 <a NAME="CircuitPythonDevice.canRunScript" ID="CircuitPythonDevice.canRunScript"></a> |
648 <a NAME="CircuitPythonDevice.canRunScript" ID="CircuitPythonDevice.canRunScript"></a> |
652 <h4>CircuitPythonDevice.canRunScript</h4> |
649 <h4>CircuitPythonDevice.canRunScript</h4> |
653 <b>canRunScript</b>(<i></i>) |
650 <b>canRunScript</b>(<i></i>) |
654 |
|
655 <p> |
651 <p> |
656 Public method to determine, if a script can be executed. |
652 Public method to determine, if a script can be executed. |
657 </p> |
653 </p> |
|
654 |
658 <dl> |
655 <dl> |
659 <dt>Return:</dt> |
656 <dt>Return:</dt> |
660 <dd> |
657 <dd> |
661 tuple containing a flag indicating it is safe to start a |
658 tuple containing a flag indicating it is safe to start a |
662 Plotter and a reason why it cannot. |
659 Plotter and a reason why it cannot. |
669 </dd> |
666 </dd> |
670 </dl> |
667 </dl> |
671 <a NAME="CircuitPythonDevice.canStartFileManager" ID="CircuitPythonDevice.canStartFileManager"></a> |
668 <a NAME="CircuitPythonDevice.canStartFileManager" ID="CircuitPythonDevice.canStartFileManager"></a> |
672 <h4>CircuitPythonDevice.canStartFileManager</h4> |
669 <h4>CircuitPythonDevice.canStartFileManager</h4> |
673 <b>canStartFileManager</b>(<i></i>) |
670 <b>canStartFileManager</b>(<i></i>) |
674 |
|
675 <p> |
671 <p> |
676 Public method to determine, if a File Manager can be started. |
672 Public method to determine, if a File Manager can be started. |
677 </p> |
673 </p> |
|
674 |
678 <dl> |
675 <dl> |
679 <dt>Return:</dt> |
676 <dt>Return:</dt> |
680 <dd> |
677 <dd> |
681 tuple containing a flag indicating it is safe to start a |
678 tuple containing a flag indicating it is safe to start a |
682 File Manager and a reason why it cannot. |
679 File Manager and a reason why it cannot. |
689 </dd> |
686 </dd> |
690 </dl> |
687 </dl> |
691 <a NAME="CircuitPythonDevice.canStartPlotter" ID="CircuitPythonDevice.canStartPlotter"></a> |
688 <a NAME="CircuitPythonDevice.canStartPlotter" ID="CircuitPythonDevice.canStartPlotter"></a> |
692 <h4>CircuitPythonDevice.canStartPlotter</h4> |
689 <h4>CircuitPythonDevice.canStartPlotter</h4> |
693 <b>canStartPlotter</b>(<i></i>) |
690 <b>canStartPlotter</b>(<i></i>) |
694 |
|
695 <p> |
691 <p> |
696 Public method to determine, if a Plotter can be started. |
692 Public method to determine, if a Plotter can be started. |
697 </p> |
693 </p> |
|
694 |
698 <dl> |
695 <dl> |
699 <dt>Return:</dt> |
696 <dt>Return:</dt> |
700 <dd> |
697 <dd> |
701 tuple containing a flag indicating it is safe to start a |
698 tuple containing a flag indicating it is safe to start a |
702 Plotter and a reason why it cannot. |
699 Plotter and a reason why it cannot. |
709 </dd> |
706 </dd> |
710 </dl> |
707 </dl> |
711 <a NAME="CircuitPythonDevice.canStartRepl" ID="CircuitPythonDevice.canStartRepl"></a> |
708 <a NAME="CircuitPythonDevice.canStartRepl" ID="CircuitPythonDevice.canStartRepl"></a> |
712 <h4>CircuitPythonDevice.canStartRepl</h4> |
709 <h4>CircuitPythonDevice.canStartRepl</h4> |
713 <b>canStartRepl</b>(<i></i>) |
710 <b>canStartRepl</b>(<i></i>) |
714 |
|
715 <p> |
711 <p> |
716 Public method to determine, if a REPL can be started. |
712 Public method to determine, if a REPL can be started. |
717 </p> |
713 </p> |
|
714 |
718 <dl> |
715 <dl> |
719 <dt>Return:</dt> |
716 <dt>Return:</dt> |
720 <dd> |
717 <dd> |
721 tuple containing a flag indicating it is safe to start a REPL |
718 tuple containing a flag indicating it is safe to start a REPL |
722 and a reason why it cannot. |
719 and a reason why it cannot. |
748 </dd> |
745 </dd> |
749 </dl> |
746 </dl> |
750 <a NAME="CircuitPythonDevice.checkInternetViaLan" ID="CircuitPythonDevice.checkInternetViaLan"></a> |
747 <a NAME="CircuitPythonDevice.checkInternetViaLan" ID="CircuitPythonDevice.checkInternetViaLan"></a> |
751 <h4>CircuitPythonDevice.checkInternetViaLan</h4> |
748 <h4>CircuitPythonDevice.checkInternetViaLan</h4> |
752 <b>checkInternetViaLan</b>(<i></i>) |
749 <b>checkInternetViaLan</b>(<i></i>) |
753 |
|
754 <p> |
750 <p> |
755 Public method to check, if the internet can be reached (LAN variant). |
751 Public method to check, if the internet can be reached (LAN variant). |
756 </p> |
752 </p> |
|
753 |
757 <dl> |
754 <dl> |
758 <dt>Return:</dt> |
755 <dt>Return:</dt> |
759 <dd> |
756 <dd> |
760 tuple containing a flag indicating reachability and an error string |
757 tuple containing a flag indicating reachability and an error string |
761 </dd> |
758 </dd> |
767 </dd> |
764 </dd> |
768 </dl> |
765 </dl> |
769 <a NAME="CircuitPythonDevice.connectToLan" ID="CircuitPythonDevice.connectToLan"></a> |
766 <a NAME="CircuitPythonDevice.connectToLan" ID="CircuitPythonDevice.connectToLan"></a> |
770 <h4>CircuitPythonDevice.connectToLan</h4> |
767 <h4>CircuitPythonDevice.connectToLan</h4> |
771 <b>connectToLan</b>(<i>config, hostname</i>) |
768 <b>connectToLan</b>(<i>config, hostname</i>) |
772 |
|
773 <p> |
769 <p> |
774 Public method to connect the connected device to the LAN. |
770 Public method to connect the connected device to the LAN. |
775 </p> |
771 </p> |
776 <p> |
772 <p> |
777 Note: The MAC address of the interface is configured with the WIZ |
773 Note: The MAC address of the interface is configured with the WIZ |
778 </p> |
774 </p> |
|
775 |
779 <dl> |
776 <dl> |
780 |
777 |
781 <dt><i>config</i> (str or tuple of (str, str, str, str))</dt> |
778 <dt><i>config</i> (str or tuple of (str, str, str, str))</dt> |
782 <dd> |
779 <dd> |
783 configuration for the connection (either the string 'dhcp' |
780 configuration for the connection (either the string 'dhcp' |
801 </dd> |
798 </dd> |
802 </dl> |
799 </dl> |
803 <a NAME="CircuitPythonDevice.connectWifi" ID="CircuitPythonDevice.connectWifi"></a> |
800 <a NAME="CircuitPythonDevice.connectWifi" ID="CircuitPythonDevice.connectWifi"></a> |
804 <h4>CircuitPythonDevice.connectWifi</h4> |
801 <h4>CircuitPythonDevice.connectWifi</h4> |
805 <b>connectWifi</b>(<i>ssid, password, hostname</i>) |
802 <b>connectWifi</b>(<i>ssid, password, hostname</i>) |
806 |
|
807 <p> |
803 <p> |
808 Public method to connect a device to a WiFi network. |
804 Public method to connect a device to a WiFi network. |
809 </p> |
805 </p> |
|
806 |
810 <dl> |
807 <dl> |
811 |
808 |
812 <dt><i>ssid</i> (str)</dt> |
809 <dt><i>ssid</i> (str)</dt> |
813 <dd> |
810 <dd> |
814 name (SSID) of the WiFi network |
811 name (SSID) of the WiFi network |
880 </dd> |
877 </dd> |
881 </dl> |
878 </dl> |
882 <a NAME="CircuitPythonDevice.deactivateInterface" ID="CircuitPythonDevice.deactivateInterface"></a> |
879 <a NAME="CircuitPythonDevice.deactivateInterface" ID="CircuitPythonDevice.deactivateInterface"></a> |
883 <h4>CircuitPythonDevice.deactivateInterface</h4> |
880 <h4>CircuitPythonDevice.deactivateInterface</h4> |
884 <b>deactivateInterface</b>(<i>interface</i>) |
881 <b>deactivateInterface</b>(<i>interface</i>) |
885 |
|
886 <p> |
882 <p> |
887 Public method to deactivate a given WiFi interface of the connected device. |
883 Public method to deactivate a given WiFi interface of the connected device. |
888 </p> |
884 </p> |
889 <p> |
885 <p> |
890 Note: With CircuitPython it is not possible to deactivate the station and |
886 Note: With CircuitPython it is not possible to deactivate the station and |
891 access point interfaces separately. |
887 access point interfaces separately. |
892 </p> |
888 </p> |
|
889 |
893 <dl> |
890 <dl> |
894 |
891 |
895 <dt><i>interface</i> (str)</dt> |
892 <dt><i>interface</i> (str)</dt> |
896 <dd> |
893 <dd> |
897 designation of the interface to be deactivated (one of 'AP' |
894 designation of the interface to be deactivated (one of 'AP' |
995 </dd> |
992 </dd> |
996 </dl> |
993 </dl> |
997 <a NAME="CircuitPythonDevice.getBluetoothStatus" ID="CircuitPythonDevice.getBluetoothStatus"></a> |
994 <a NAME="CircuitPythonDevice.getBluetoothStatus" ID="CircuitPythonDevice.getBluetoothStatus"></a> |
998 <h4>CircuitPythonDevice.getBluetoothStatus</h4> |
995 <h4>CircuitPythonDevice.getBluetoothStatus</h4> |
999 <b>getBluetoothStatus</b>(<i></i>) |
996 <b>getBluetoothStatus</b>(<i></i>) |
1000 |
|
1001 <p> |
997 <p> |
1002 Public method to get Bluetooth status data of the connected board. |
998 Public method to get Bluetooth status data of the connected board. |
1003 </p> |
999 </p> |
|
1000 |
1004 <dl> |
1001 <dl> |
1005 <dt>Return:</dt> |
1002 <dt>Return:</dt> |
1006 <dd> |
1003 <dd> |
1007 list of tuples containing the translated status data label and |
1004 list of tuples containing the translated status data label and |
1008 the associated value |
1005 the associated value |
1022 </dd> |
1019 </dd> |
1023 </dl> |
1020 </dl> |
1024 <a NAME="CircuitPythonDevice.getConnectedClients" ID="CircuitPythonDevice.getConnectedClients"></a> |
1021 <a NAME="CircuitPythonDevice.getConnectedClients" ID="CircuitPythonDevice.getConnectedClients"></a> |
1025 <h4>CircuitPythonDevice.getConnectedClients</h4> |
1022 <h4>CircuitPythonDevice.getConnectedClients</h4> |
1026 <b>getConnectedClients</b>(<i></i>) |
1023 <b>getConnectedClients</b>(<i></i>) |
1027 |
|
1028 <p> |
1024 <p> |
1029 Public method to get a list of connected clients. |
1025 Public method to get a list of connected clients. |
1030 </p> |
1026 </p> |
|
1027 |
1031 <dl> |
1028 <dl> |
1032 <dt>Return:</dt> |
1029 <dt>Return:</dt> |
1033 <dd> |
1030 <dd> |
1034 a tuple containing a list of tuples containing the client MAC-Address |
1031 a tuple containing a list of tuples containing the client MAC-Address |
1035 and the RSSI (if supported and available) and an error message |
1032 and the RSSI (if supported and available) and an error message |
1042 </dd> |
1039 </dd> |
1043 </dl> |
1040 </dl> |
1044 <a NAME="CircuitPythonDevice.getDeviceScan" ID="CircuitPythonDevice.getDeviceScan"></a> |
1041 <a NAME="CircuitPythonDevice.getDeviceScan" ID="CircuitPythonDevice.getDeviceScan"></a> |
1045 <h4>CircuitPythonDevice.getDeviceScan</h4> |
1042 <h4>CircuitPythonDevice.getDeviceScan</h4> |
1046 <b>getDeviceScan</b>(<i>timeout=10</i>) |
1043 <b>getDeviceScan</b>(<i>timeout=10</i>) |
1047 |
|
1048 <p> |
1044 <p> |
1049 Public method to perform a Bluetooth device scan. |
1045 Public method to perform a Bluetooth device scan. |
1050 </p> |
1046 </p> |
|
1047 |
1051 <dl> |
1048 <dl> |
1052 |
1049 |
1053 <dt><i>timeout</i> (int (optional))</dt> |
1050 <dt><i>timeout</i> (int (optional))</dt> |
1054 <dd> |
1051 <dd> |
1055 duration of the device scan in seconds (defaults |
1052 duration of the device scan in seconds (defaults |
1109 </dd> |
1106 </dd> |
1110 </dl> |
1107 </dl> |
1111 <a NAME="CircuitPythonDevice.getEthernetStatus" ID="CircuitPythonDevice.getEthernetStatus"></a> |
1108 <a NAME="CircuitPythonDevice.getEthernetStatus" ID="CircuitPythonDevice.getEthernetStatus"></a> |
1112 <h4>CircuitPythonDevice.getEthernetStatus</h4> |
1109 <h4>CircuitPythonDevice.getEthernetStatus</h4> |
1113 <b>getEthernetStatus</b>(<i></i>) |
1110 <b>getEthernetStatus</b>(<i></i>) |
1114 |
|
1115 <p> |
1111 <p> |
1116 Public method to get Ethernet status data of the connected board. |
1112 Public method to get Ethernet status data of the connected board. |
1117 </p> |
1113 </p> |
|
1114 |
1118 <dl> |
1115 <dl> |
1119 <dt>Return:</dt> |
1116 <dt>Return:</dt> |
1120 <dd> |
1117 <dd> |
1121 list of tuples containing the translated status data label and |
1118 list of tuples containing the translated status data label and |
1122 the associated value |
1119 the associated value |
1136 </dd> |
1133 </dd> |
1137 </dl> |
1134 </dl> |
1138 <a NAME="CircuitPythonDevice.getWifiData" ID="CircuitPythonDevice.getWifiData"></a> |
1135 <a NAME="CircuitPythonDevice.getWifiData" ID="CircuitPythonDevice.getWifiData"></a> |
1139 <h4>CircuitPythonDevice.getWifiData</h4> |
1136 <h4>CircuitPythonDevice.getWifiData</h4> |
1140 <b>getWifiData</b>(<i></i>) |
1137 <b>getWifiData</b>(<i></i>) |
1141 |
|
1142 <p> |
1138 <p> |
1143 Public method to get data related to the current WiFi status. |
1139 Public method to get data related to the current WiFi status. |
1144 </p> |
1140 </p> |
|
1141 |
1145 <dl> |
1142 <dl> |
1146 <dt>Return:</dt> |
1143 <dt>Return:</dt> |
1147 <dd> |
1144 <dd> |
1148 tuple of three dictionaries containing the WiFi status data |
1145 tuple of three dictionaries containing the WiFi status data |
1149 for the WiFi client, access point and overall data |
1146 for the WiFi client, access point and overall data |
1215 </dd> |
1212 </dd> |
1216 </dl> |
1213 </dl> |
1217 <a NAME="CircuitPythonDevice.hasEthernet" ID="CircuitPythonDevice.hasEthernet"></a> |
1214 <a NAME="CircuitPythonDevice.hasEthernet" ID="CircuitPythonDevice.hasEthernet"></a> |
1218 <h4>CircuitPythonDevice.hasEthernet</h4> |
1215 <h4>CircuitPythonDevice.hasEthernet</h4> |
1219 <b>hasEthernet</b>(<i></i>) |
1216 <b>hasEthernet</b>(<i></i>) |
1220 |
|
1221 <p> |
1217 <p> |
1222 Public method to check the availability of Ethernet. |
1218 Public method to check the availability of Ethernet. |
1223 </p> |
1219 </p> |
|
1220 |
1224 <dl> |
1221 <dl> |
1225 <dt>Return:</dt> |
1222 <dt>Return:</dt> |
1226 <dd> |
1223 <dd> |
1227 tuple containing a flag indicating the availability of Ethernet |
1224 tuple containing a flag indicating the availability of Ethernet |
1228 and the Ethernet type |
1225 and the Ethernet type |
1390 </dd> |
1387 </dd> |
1391 </dl> |
1388 </dl> |
1392 <a NAME="CircuitPythonDevice.removeLanAutoConnect" ID="CircuitPythonDevice.removeLanAutoConnect"></a> |
1389 <a NAME="CircuitPythonDevice.removeLanAutoConnect" ID="CircuitPythonDevice.removeLanAutoConnect"></a> |
1393 <h4>CircuitPythonDevice.removeLanAutoConnect</h4> |
1390 <h4>CircuitPythonDevice.removeLanAutoConnect</h4> |
1394 <b>removeLanAutoConnect</b>(<i></i>) |
1391 <b>removeLanAutoConnect</b>(<i></i>) |
1395 |
|
1396 <p> |
1392 <p> |
1397 Public method to remove the saved IPv4 parameters from the connected device. |
1393 Public method to remove the saved IPv4 parameters from the connected device. |
1398 </p> |
1394 </p> |
1399 <p> |
1395 <p> |
1400 Note: This disables the LAN auto-connect feature. |
1396 Note: This disables the LAN auto-connect feature. |
1401 </p> |
1397 </p> |
|
1398 |
1402 <dl> |
1399 <dl> |
1403 <dt>Return:</dt> |
1400 <dt>Return:</dt> |
1404 <dd> |
1401 <dd> |
1405 tuple containing a flag indicating success and an error message |
1402 tuple containing a flag indicating success and an error message |
1406 </dd> |
1403 </dd> |
1412 </dd> |
1409 </dd> |
1413 </dl> |
1410 </dl> |
1414 <a NAME="CircuitPythonDevice.runScript" ID="CircuitPythonDevice.runScript"></a> |
1411 <a NAME="CircuitPythonDevice.runScript" ID="CircuitPythonDevice.runScript"></a> |
1415 <h4>CircuitPythonDevice.runScript</h4> |
1412 <h4>CircuitPythonDevice.runScript</h4> |
1416 <b>runScript</b>(<i>script</i>) |
1413 <b>runScript</b>(<i>script</i>) |
1417 |
|
1418 <p> |
1414 <p> |
1419 Public method to run the given Python script. |
1415 Public method to run the given Python script. |
1420 </p> |
1416 </p> |
|
1417 |
1421 <dl> |
1418 <dl> |
1422 |
1419 |
1423 <dt><i>script</i> (str)</dt> |
1420 <dt><i>script</i> (str)</dt> |
1424 <dd> |
1421 <dd> |
1425 script to be executed |
1422 script to be executed |
1426 </dd> |
1423 </dd> |
1427 </dl> |
1424 </dl> |
1428 <a NAME="CircuitPythonDevice.scanNetworks" ID="CircuitPythonDevice.scanNetworks"></a> |
1425 <a NAME="CircuitPythonDevice.scanNetworks" ID="CircuitPythonDevice.scanNetworks"></a> |
1429 <h4>CircuitPythonDevice.scanNetworks</h4> |
1426 <h4>CircuitPythonDevice.scanNetworks</h4> |
1430 <b>scanNetworks</b>(<i></i>) |
1427 <b>scanNetworks</b>(<i></i>) |
1431 |
|
1432 <p> |
1428 <p> |
1433 Public method to scan for available WiFi networks. |
1429 Public method to scan for available WiFi networks. |
1434 </p> |
1430 </p> |
|
1431 |
1435 <dl> |
1432 <dl> |
1436 <dt>Return:</dt> |
1433 <dt>Return:</dt> |
1437 <dd> |
1434 <dd> |
1438 tuple containing the list of available networks as a tuple of 'Name', |
1435 tuple containing the list of available networks as a tuple of 'Name', |
1439 'MAC-Address', 'channel', 'RSSI' and 'security' and an error string |
1436 'MAC-Address', 'channel', 'RSSI' and 'security' and an error string |
1446 </dd> |
1443 </dd> |
1447 </dl> |
1444 </dl> |
1448 <a NAME="CircuitPythonDevice.setButtons" ID="CircuitPythonDevice.setButtons"></a> |
1445 <a NAME="CircuitPythonDevice.setButtons" ID="CircuitPythonDevice.setButtons"></a> |
1449 <h4>CircuitPythonDevice.setButtons</h4> |
1446 <h4>CircuitPythonDevice.setButtons</h4> |
1450 <b>setButtons</b>(<i></i>) |
1447 <b>setButtons</b>(<i></i>) |
1451 |
|
1452 <p> |
1448 <p> |
1453 Public method to enable the supported action buttons. |
1449 Public method to enable the supported action buttons. |
1454 </p> |
1450 </p> |
|
1451 |
1455 <a NAME="CircuitPythonDevice.setConnected" ID="CircuitPythonDevice.setConnected"></a> |
1452 <a NAME="CircuitPythonDevice.setConnected" ID="CircuitPythonDevice.setConnected"></a> |
1456 <h4>CircuitPythonDevice.setConnected</h4> |
1453 <h4>CircuitPythonDevice.setConnected</h4> |
1457 <b>setConnected</b>(<i>connected</i>) |
1454 <b>setConnected</b>(<i>connected</i>) |
1458 |
|
1459 <p> |
1455 <p> |
1460 Public method to set the connection state. |
1456 Public method to set the connection state. |
1461 </p> |
1457 </p> |
|
1458 |
1462 <dl> |
1459 <dl> |
1463 |
1460 |
1464 <dt><i>connected</i> (bool)</dt> |
1461 <dt><i>connected</i> (bool)</dt> |
1465 <dd> |
1462 <dd> |
1466 connection state |
1463 connection state |
1467 </dd> |
1464 </dd> |
1468 </dl> |
1465 </dl> |
1469 <a NAME="CircuitPythonDevice.setNetworkTime" ID="CircuitPythonDevice.setNetworkTime"></a> |
1466 <a NAME="CircuitPythonDevice.setNetworkTime" ID="CircuitPythonDevice.setNetworkTime"></a> |
1470 <h4>CircuitPythonDevice.setNetworkTime</h4> |
1467 <h4>CircuitPythonDevice.setNetworkTime</h4> |
1471 <b>setNetworkTime</b>(<i>server="0.pool.ntp.org", tzOffset=0, timeout=10</i>) |
1468 <b>setNetworkTime</b>(<i>server="0.pool.ntp.org", tzOffset=0, timeout=10</i>) |
1472 |
|
1473 <p> |
1469 <p> |
1474 Public method to set the time to the network time retrieved from an |
1470 Public method to set the time to the network time retrieved from an |
1475 NTP server. |
1471 NTP server. |
1476 </p> |
1472 </p> |
|
1473 |
1477 <dl> |
1474 <dl> |
1478 |
1475 |
1479 <dt><i>server</i> (str (optional))</dt> |
1476 <dt><i>server</i> (str (optional))</dt> |
1480 <dd> |
1477 <dd> |
1481 name of the NTP server to get the network time from |
1478 name of the NTP server to get the network time from |
1504 </dd> |
1501 </dd> |
1505 </dl> |
1502 </dl> |
1506 <a NAME="CircuitPythonDevice.setWorkspace" ID="CircuitPythonDevice.setWorkspace"></a> |
1503 <a NAME="CircuitPythonDevice.setWorkspace" ID="CircuitPythonDevice.setWorkspace"></a> |
1507 <h4>CircuitPythonDevice.setWorkspace</h4> |
1504 <h4>CircuitPythonDevice.setWorkspace</h4> |
1508 <b>setWorkspace</b>(<i>workspacePath</i>) |
1505 <b>setWorkspace</b>(<i>workspacePath</i>) |
1509 |
|
1510 <p> |
1506 <p> |
1511 Public method to set the device workspace directory. |
1507 Public method to set the device workspace directory. |
1512 </p> |
1508 </p> |
|
1509 |
1513 <dl> |
1510 <dl> |
1514 |
1511 |
1515 <dt><i>workspacePath</i> (str)</dt> |
1512 <dt><i>workspacePath</i> (str)</dt> |
1516 <dd> |
1513 <dd> |
1517 directory to be used for saving files |
1514 directory to be used for saving files |
1518 </dd> |
1515 </dd> |
1519 </dl> |
1516 </dl> |
1520 <a NAME="CircuitPythonDevice.showCircuitPythonVersions" ID="CircuitPythonDevice.showCircuitPythonVersions"></a> |
1517 <a NAME="CircuitPythonDevice.showCircuitPythonVersions" ID="CircuitPythonDevice.showCircuitPythonVersions"></a> |
1521 <h4>CircuitPythonDevice.showCircuitPythonVersions</h4> |
1518 <h4>CircuitPythonDevice.showCircuitPythonVersions</h4> |
1522 <b>showCircuitPythonVersions</b>(<i></i>) |
1519 <b>showCircuitPythonVersions</b>(<i></i>) |
1523 |
|
1524 <p> |
1520 <p> |
1525 Public slot to show the CircuitPython version of a connected device and |
1521 Public slot to show the CircuitPython version of a connected device and |
1526 the latest available one (from Github). |
1522 the latest available one (from Github). |
1527 </p> |
1523 </p> |
|
1524 |
1528 <a NAME="CircuitPythonDevice.startAccessPoint" ID="CircuitPythonDevice.startAccessPoint"></a> |
1525 <a NAME="CircuitPythonDevice.startAccessPoint" ID="CircuitPythonDevice.startAccessPoint"></a> |
1529 <h4>CircuitPythonDevice.startAccessPoint</h4> |
1526 <h4>CircuitPythonDevice.startAccessPoint</h4> |
1530 <b>startAccessPoint</b>(<i>ssid, security=None, password=None, hostname=None, ifconfig=None, </i>) |
1527 <b>startAccessPoint</b>(<i>ssid, security=None, password=None, hostname=None, ifconfig=None, </i>) |
1531 |
|
1532 <p> |
1528 <p> |
1533 Public method to start the access point interface. |
1529 Public method to start the access point interface. |
1534 </p> |
1530 </p> |
|
1531 |
1535 <dl> |
1532 <dl> |
1536 |
1533 |
1537 <dt><i>ssid</i> (str)</dt> |
1534 <dt><i>ssid</i> (str)</dt> |
1538 <dd> |
1535 <dd> |
1539 SSID of the access point |
1536 SSID of the access point |
1607 </dd> |
1604 </dd> |
1608 </dl> |
1605 </dl> |
1609 <a NAME="CircuitPythonDevice.writeCredentials" ID="CircuitPythonDevice.writeCredentials"></a> |
1606 <a NAME="CircuitPythonDevice.writeCredentials" ID="CircuitPythonDevice.writeCredentials"></a> |
1610 <h4>CircuitPythonDevice.writeCredentials</h4> |
1607 <h4>CircuitPythonDevice.writeCredentials</h4> |
1611 <b>writeCredentials</b>(<i>ssid, password, hostname, country</i>) |
1608 <b>writeCredentials</b>(<i>ssid, password, hostname, country</i>) |
1612 |
|
1613 <p> |
1609 <p> |
1614 Public method to write the given credentials to the connected device and modify |
1610 Public method to write the given credentials to the connected device and modify |
1615 the start script to connect automatically. |
1611 the start script to connect automatically. |
1616 </p> |
1612 </p> |
|
1613 |
1617 <dl> |
1614 <dl> |
1618 |
1615 |
1619 <dt><i>ssid</i> (str)</dt> |
1616 <dt><i>ssid</i> (str)</dt> |
1620 <dd> |
1617 <dd> |
1621 SSID of the network to connect to |
1618 SSID of the network to connect to |
1646 </dd> |
1643 </dd> |
1647 </dl> |
1644 </dl> |
1648 <a NAME="CircuitPythonDevice.writeLanAutoConnect" ID="CircuitPythonDevice.writeLanAutoConnect"></a> |
1645 <a NAME="CircuitPythonDevice.writeLanAutoConnect" ID="CircuitPythonDevice.writeLanAutoConnect"></a> |
1649 <h4>CircuitPythonDevice.writeLanAutoConnect</h4> |
1646 <h4>CircuitPythonDevice.writeLanAutoConnect</h4> |
1650 <b>writeLanAutoConnect</b>(<i>config, hostname</i>) |
1647 <b>writeLanAutoConnect</b>(<i>config, hostname</i>) |
1651 |
|
1652 <p> |
1648 <p> |
1653 Public method to generate a script and associated configuration to connect the |
1649 Public method to generate a script and associated configuration to connect the |
1654 device to the LAN during boot time. |
1650 device to the LAN during boot time. |
1655 </p> |
1651 </p> |
|
1652 |
1656 <dl> |
1653 <dl> |
1657 |
1654 |
1658 <dt><i>config</i> (str or tuple of (str, str, str, str))</dt> |
1655 <dt><i>config</i> (str or tuple of (str, str, str, str))</dt> |
1659 <dd> |
1656 <dd> |
1660 configuration for the connection (either the string 'dhcp' |
1657 configuration for the connection (either the string 'dhcp' |
1681 <hr /> |
1678 <hr /> |
1682 <hr /> |
1679 <hr /> |
1683 <a NAME="createDevice" ID="createDevice"></a> |
1680 <a NAME="createDevice" ID="createDevice"></a> |
1684 <h2>createDevice</h2> |
1681 <h2>createDevice</h2> |
1685 <b>createDevice</b>(<i>microPythonWidget, deviceType, vid, pid, boardName, serialNumber</i>) |
1682 <b>createDevice</b>(<i>microPythonWidget, deviceType, vid, pid, boardName, serialNumber</i>) |
1686 |
|
1687 <p> |
1683 <p> |
1688 Function to instantiate a MicroPython device object. |
1684 Function to instantiate a MicroPython device object. |
1689 </p> |
1685 </p> |
|
1686 |
1690 <dl> |
1687 <dl> |
1691 |
1688 |
1692 <dt><i>microPythonWidget</i> (MicroPythonWidget)</dt> |
1689 <dt><i>microPythonWidget</i> (MicroPythonWidget)</dt> |
1693 <dd> |
1690 <dd> |
1694 reference to the main MicroPython widget |
1691 reference to the main MicroPython widget |