src/eric7/Documentation/Source/eric7.MicroPython.Devices.CircuitPythonDevices.html

branch
eric7
changeset 10479
856476537696
parent 10333
4aa8d3b69832
child 10684
58c7f23ae1cb
equal deleted inserted replaced
10478:de9106c55c3d 10479:856476537696
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>
434 </dd> 431 </dd>
435 </dl> 432 </dl>
436 <a NAME="CircuitPythonDevice.__deviceVolumeMounted" ID="CircuitPythonDevice.__deviceVolumeMounted"></a> 433 <a NAME="CircuitPythonDevice.__deviceVolumeMounted" ID="CircuitPythonDevice.__deviceVolumeMounted"></a>
437 <h4>CircuitPythonDevice.__deviceVolumeMounted</h4> 434 <h4>CircuitPythonDevice.__deviceVolumeMounted</h4>
438 <b>__deviceVolumeMounted</b>(<i></i>) 435 <b>__deviceVolumeMounted</b>(<i></i>)
439
440 <p> 436 <p>
441 Private method to check, if the device volume is mounted. 437 Private method to check, if the device volume is mounted.
442 </p> 438 </p>
439
443 <dl> 440 <dl>
444 <dt>Return:</dt> 441 <dt>Return:</dt>
445 <dd> 442 <dd>
446 flag indicated a mounted device 443 flag indicated a mounted device
447 </dd> 444 </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.
729 </dd> 726 </dd>
730 </dl> 727 </dl>
731 <a NAME="CircuitPythonDevice.checkInternet" ID="CircuitPythonDevice.checkInternet"></a> 728 <a NAME="CircuitPythonDevice.checkInternet" ID="CircuitPythonDevice.checkInternet"></a>
732 <h4>CircuitPythonDevice.checkInternet</h4> 729 <h4>CircuitPythonDevice.checkInternet</h4>
733 <b>checkInternet</b>(<i></i>) 730 <b>checkInternet</b>(<i></i>)
734
735 <p> 731 <p>
736 Public method to check, if the internet can be reached. 732 Public method to check, if the internet can be reached.
737 </p> 733 </p>
734
738 <dl> 735 <dl>
739 <dt>Return:</dt> 736 <dt>Return:</dt>
740 <dd> 737 <dd>
741 tuple containing a flag indicating reachability and an error string 738 tuple containing a flag indicating reachability and an error string
742 </dd> 739 </dd>
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
835 </dd> 832 </dd>
836 </dl> 833 </dl>
837 <a NAME="CircuitPythonDevice.deactivateBluetoothInterface" ID="CircuitPythonDevice.deactivateBluetoothInterface"></a> 834 <a NAME="CircuitPythonDevice.deactivateBluetoothInterface" ID="CircuitPythonDevice.deactivateBluetoothInterface"></a>
838 <h4>CircuitPythonDevice.deactivateBluetoothInterface</h4> 835 <h4>CircuitPythonDevice.deactivateBluetoothInterface</h4>
839 <b>deactivateBluetoothInterface</b>(<i></i>) 836 <b>deactivateBluetoothInterface</b>(<i></i>)
840
841 <p> 837 <p>
842 Public method to deactivate the Bluetooth interface. 838 Public method to deactivate the Bluetooth interface.
843 </p> 839 </p>
840
844 <dl> 841 <dl>
845 <dt>Return:</dt> 842 <dt>Return:</dt>
846 <dd> 843 <dd>
847 flag indicating the new state of the Bluetooth interface 844 flag indicating the new state of the Bluetooth interface
848 </dd> 845 </dd>
861 </dd> 858 </dd>
862 </dl> 859 </dl>
863 <a NAME="CircuitPythonDevice.deactivateEthernet" ID="CircuitPythonDevice.deactivateEthernet"></a> 860 <a NAME="CircuitPythonDevice.deactivateEthernet" ID="CircuitPythonDevice.deactivateEthernet"></a>
864 <h4>CircuitPythonDevice.deactivateEthernet</h4> 861 <h4>CircuitPythonDevice.deactivateEthernet</h4>
865 <b>deactivateEthernet</b>(<i></i>) 862 <b>deactivateEthernet</b>(<i></i>)
866
867 <p> 863 <p>
868 Public method to deactivate the Ethernet interface of the connected device. 864 Public method to deactivate the Ethernet interface of the connected device.
869 </p> 865 </p>
866
870 <dl> 867 <dl>
871 <dt>Return:</dt> 868 <dt>Return:</dt>
872 <dd> 869 <dd>
873 tuple containg a flag indicating success and an error message 870 tuple containg a flag indicating success and an error message
874 </dd> 871 </dd>
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'
918 </dd> 915 </dd>
919 </dl> 916 </dl>
920 <a NAME="CircuitPythonDevice.deviceName" ID="CircuitPythonDevice.deviceName"></a> 917 <a NAME="CircuitPythonDevice.deviceName" ID="CircuitPythonDevice.deviceName"></a>
921 <h4>CircuitPythonDevice.deviceName</h4> 918 <h4>CircuitPythonDevice.deviceName</h4>
922 <b>deviceName</b>(<i></i>) 919 <b>deviceName</b>(<i></i>)
923
924 <p> 920 <p>
925 Public method to get the name of the device. 921 Public method to get the name of the device.
926 </p> 922 </p>
923
927 <dl> 924 <dl>
928 <dt>Return:</dt> 925 <dt>Return:</dt>
929 <dd> 926 <dd>
930 name of the device 927 name of the device
931 </dd> 928 </dd>
937 </dd> 934 </dd>
938 </dl> 935 </dl>
939 <a NAME="CircuitPythonDevice.disconnectFromLan" ID="CircuitPythonDevice.disconnectFromLan"></a> 936 <a NAME="CircuitPythonDevice.disconnectFromLan" ID="CircuitPythonDevice.disconnectFromLan"></a>
940 <h4>CircuitPythonDevice.disconnectFromLan</h4> 937 <h4>CircuitPythonDevice.disconnectFromLan</h4>
941 <b>disconnectFromLan</b>(<i></i>) 938 <b>disconnectFromLan</b>(<i></i>)
942
943 <p> 939 <p>
944 Public method to disconnect from the LAN. 940 Public method to disconnect from the LAN.
945 </p> 941 </p>
942
946 <dl> 943 <dl>
947 <dt>Return:</dt> 944 <dt>Return:</dt>
948 <dd> 945 <dd>
949 tuple containing a flag indicating success and an error message 946 tuple containing a flag indicating success and an error message
950 </dd> 947 </dd>
956 </dd> 953 </dd>
957 </dl> 954 </dl>
958 <a NAME="CircuitPythonDevice.disconnectWifi" ID="CircuitPythonDevice.disconnectWifi"></a> 955 <a NAME="CircuitPythonDevice.disconnectWifi" ID="CircuitPythonDevice.disconnectWifi"></a>
959 <h4>CircuitPythonDevice.disconnectWifi</h4> 956 <h4>CircuitPythonDevice.disconnectWifi</h4>
960 <b>disconnectWifi</b>(<i></i>) 957 <b>disconnectWifi</b>(<i></i>)
961
962 <p> 958 <p>
963 Public method to disconnect a device from the WiFi network. 959 Public method to disconnect a device from the WiFi network.
964 </p> 960 </p>
961
965 <dl> 962 <dl>
966 <dt>Return:</dt> 963 <dt>Return:</dt>
967 <dd> 964 <dd>
968 tuple containing a flag indicating success and an error string 965 tuple containing a flag indicating success and an error string
969 </dd> 966 </dd>
975 </dd> 972 </dd>
976 </dl> 973 </dl>
977 <a NAME="CircuitPythonDevice.forceInterrupt" ID="CircuitPythonDevice.forceInterrupt"></a> 974 <a NAME="CircuitPythonDevice.forceInterrupt" ID="CircuitPythonDevice.forceInterrupt"></a>
978 <h4>CircuitPythonDevice.forceInterrupt</h4> 975 <h4>CircuitPythonDevice.forceInterrupt</h4>
979 <b>forceInterrupt</b>(<i></i>) 976 <b>forceInterrupt</b>(<i></i>)
980
981 <p> 977 <p>
982 Public method to determine the need for an interrupt when opening the 978 Public method to determine the need for an interrupt when opening the
983 serial connection. 979 serial connection.
984 </p> 980 </p>
981
985 <dl> 982 <dl>
986 <dt>Return:</dt> 983 <dt>Return:</dt>
987 <dd> 984 <dd>
988 flag indicating an interrupt is needed 985 flag indicating an interrupt is needed
989 </dd> 986 </dd>
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
1070 </dd> 1067 </dd>
1071 </dl> 1068 </dl>
1072 <a NAME="CircuitPythonDevice.getDocumentationUrl" ID="CircuitPythonDevice.getDocumentationUrl"></a> 1069 <a NAME="CircuitPythonDevice.getDocumentationUrl" ID="CircuitPythonDevice.getDocumentationUrl"></a>
1073 <h4>CircuitPythonDevice.getDocumentationUrl</h4> 1070 <h4>CircuitPythonDevice.getDocumentationUrl</h4>
1074 <b>getDocumentationUrl</b>(<i></i>) 1071 <b>getDocumentationUrl</b>(<i></i>)
1075
1076 <p> 1072 <p>
1077 Public method to get the device documentation URL. 1073 Public method to get the device documentation URL.
1078 </p> 1074 </p>
1075
1079 <dl> 1076 <dl>
1080 <dt>Return:</dt> 1077 <dt>Return:</dt>
1081 <dd> 1078 <dd>
1082 documentation URL of the device 1079 documentation URL of the device
1083 </dd> 1080 </dd>
1089 </dd> 1086 </dd>
1090 </dl> 1087 </dl>
1091 <a NAME="CircuitPythonDevice.getDownloadMenuEntries" ID="CircuitPythonDevice.getDownloadMenuEntries"></a> 1088 <a NAME="CircuitPythonDevice.getDownloadMenuEntries" ID="CircuitPythonDevice.getDownloadMenuEntries"></a>
1092 <h4>CircuitPythonDevice.getDownloadMenuEntries</h4> 1089 <h4>CircuitPythonDevice.getDownloadMenuEntries</h4>
1093 <b>getDownloadMenuEntries</b>(<i></i>) 1090 <b>getDownloadMenuEntries</b>(<i></i>)
1094
1095 <p> 1091 <p>
1096 Public method to retrieve the entries for the downloads menu. 1092 Public method to retrieve the entries for the downloads menu.
1097 </p> 1093 </p>
1094
1098 <dl> 1095 <dl>
1099 <dt>Return:</dt> 1096 <dt>Return:</dt>
1100 <dd> 1097 <dd>
1101 list of tuples with menu text and URL to be opened for each 1098 list of tuples with menu text and URL to be opened for each
1102 entry 1099 entry
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
1163 </dd> 1160 </dd>
1164 </dl> 1161 </dl>
1165 <a NAME="CircuitPythonDevice.getWorkspace" ID="CircuitPythonDevice.getWorkspace"></a> 1162 <a NAME="CircuitPythonDevice.getWorkspace" ID="CircuitPythonDevice.getWorkspace"></a>
1166 <h4>CircuitPythonDevice.getWorkspace</h4> 1163 <h4>CircuitPythonDevice.getWorkspace</h4>
1167 <b>getWorkspace</b>(<i>silent=False</i>) 1164 <b>getWorkspace</b>(<i>silent=False</i>)
1168
1169 <p> 1165 <p>
1170 Public method to get the workspace directory. 1166 Public method to get the workspace directory.
1171 </p> 1167 </p>
1168
1172 <dl> 1169 <dl>
1173 1170
1174 <dt><i>silent</i> (bool)</dt> 1171 <dt><i>silent</i> (bool)</dt>
1175 <dd> 1172 <dd>
1176 flag indicating silent operations 1173 flag indicating silent operations
1189 </dd> 1186 </dd>
1190 </dl> 1187 </dl>
1191 <a NAME="CircuitPythonDevice.hasBluetooth" ID="CircuitPythonDevice.hasBluetooth"></a> 1188 <a NAME="CircuitPythonDevice.hasBluetooth" ID="CircuitPythonDevice.hasBluetooth"></a>
1192 <h4>CircuitPythonDevice.hasBluetooth</h4> 1189 <h4>CircuitPythonDevice.hasBluetooth</h4>
1193 <b>hasBluetooth</b>(<i></i>) 1190 <b>hasBluetooth</b>(<i></i>)
1194
1195 <p> 1191 <p>
1196 Public method to check the availability of Bluetooth. 1192 Public method to check the availability of Bluetooth.
1197 </p> 1193 </p>
1194
1198 <dl> 1195 <dl>
1199 <dt>Return:</dt> 1196 <dt>Return:</dt>
1200 <dd> 1197 <dd>
1201 flag indicating the availability of Bluetooth 1198 flag indicating the availability of Bluetooth
1202 </dd> 1199 </dd>
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
1242 </dd> 1239 </dd>
1243 </dl> 1240 </dl>
1244 <a NAME="CircuitPythonDevice.hasFlashMenuEntry" ID="CircuitPythonDevice.hasFlashMenuEntry"></a> 1241 <a NAME="CircuitPythonDevice.hasFlashMenuEntry" ID="CircuitPythonDevice.hasFlashMenuEntry"></a>
1245 <h4>CircuitPythonDevice.hasFlashMenuEntry</h4> 1242 <h4>CircuitPythonDevice.hasFlashMenuEntry</h4>
1246 <b>hasFlashMenuEntry</b>(<i></i>) 1243 <b>hasFlashMenuEntry</b>(<i></i>)
1247
1248 <p> 1244 <p>
1249 Public method to check, if the device has its own flash menu entry. 1245 Public method to check, if the device has its own flash menu entry.
1250 </p> 1246 </p>
1247
1251 <dl> 1248 <dl>
1252 <dt>Return:</dt> 1249 <dt>Return:</dt>
1253 <dd> 1250 <dd>
1254 flag indicating a specific flash menu entry 1251 flag indicating a specific flash menu entry
1255 </dd> 1252 </dd>
1261 </dd> 1258 </dd>
1262 </dl> 1259 </dl>
1263 <a NAME="CircuitPythonDevice.hasNetworkTime" ID="CircuitPythonDevice.hasNetworkTime"></a> 1260 <a NAME="CircuitPythonDevice.hasNetworkTime" ID="CircuitPythonDevice.hasNetworkTime"></a>
1264 <h4>CircuitPythonDevice.hasNetworkTime</h4> 1261 <h4>CircuitPythonDevice.hasNetworkTime</h4>
1265 <b>hasNetworkTime</b>(<i></i>) 1262 <b>hasNetworkTime</b>(<i></i>)
1266
1267 <p> 1263 <p>
1268 Public method to check the availability of network time functions. 1264 Public method to check the availability of network time functions.
1269 </p> 1265 </p>
1266
1270 <dl> 1267 <dl>
1271 <dt>Return:</dt> 1268 <dt>Return:</dt>
1272 <dd> 1269 <dd>
1273 flag indicating the availability of network time functions 1270 flag indicating the availability of network time functions
1274 </dd> 1271 </dd>
1287 </dd> 1284 </dd>
1288 </dl> 1285 </dl>
1289 <a NAME="CircuitPythonDevice.hasWifi" ID="CircuitPythonDevice.hasWifi"></a> 1286 <a NAME="CircuitPythonDevice.hasWifi" ID="CircuitPythonDevice.hasWifi"></a>
1290 <h4>CircuitPythonDevice.hasWifi</h4> 1287 <h4>CircuitPythonDevice.hasWifi</h4>
1291 <b>hasWifi</b>(<i></i>) 1288 <b>hasWifi</b>(<i></i>)
1292
1293 <p> 1289 <p>
1294 Public method to check the availability of WiFi. 1290 Public method to check the availability of WiFi.
1295 </p> 1291 </p>
1292
1296 <dl> 1293 <dl>
1297 <dt>Return:</dt> 1294 <dt>Return:</dt>
1298 <dd> 1295 <dd>
1299 tuple containing a flag indicating the availability of WiFi 1296 tuple containing a flag indicating the availability of WiFi
1300 and the WiFi type (circuitpython) 1297 and the WiFi type (circuitpython)
1314 </dd> 1311 </dd>
1315 </dl> 1312 </dl>
1316 <a NAME="CircuitPythonDevice.isLanConnected" ID="CircuitPythonDevice.isLanConnected"></a> 1313 <a NAME="CircuitPythonDevice.isLanConnected" ID="CircuitPythonDevice.isLanConnected"></a>
1317 <h4>CircuitPythonDevice.isLanConnected</h4> 1314 <h4>CircuitPythonDevice.isLanConnected</h4>
1318 <b>isLanConnected</b>(<i></i>) 1315 <b>isLanConnected</b>(<i></i>)
1319
1320 <p> 1316 <p>
1321 Public method to check the LAN connection status. 1317 Public method to check the LAN connection status.
1322 </p> 1318 </p>
1319
1323 <dl> 1320 <dl>
1324 <dt>Return:</dt> 1321 <dt>Return:</dt>
1325 <dd> 1322 <dd>
1326 flag indicating that the device is connected to the LAN 1323 flag indicating that the device is connected to the LAN
1327 </dd> 1324 </dd>
1333 </dd> 1330 </dd>
1334 </dl> 1331 </dl>
1335 <a NAME="CircuitPythonDevice.isWifiApConnected" ID="CircuitPythonDevice.isWifiApConnected"></a> 1332 <a NAME="CircuitPythonDevice.isWifiApConnected" ID="CircuitPythonDevice.isWifiApConnected"></a>
1336 <h4>CircuitPythonDevice.isWifiApConnected</h4> 1333 <h4>CircuitPythonDevice.isWifiApConnected</h4>
1337 <b>isWifiApConnected</b>(<i></i>) 1334 <b>isWifiApConnected</b>(<i></i>)
1338
1339 <p> 1335 <p>
1340 Public method to check the WiFi connection status as access point. 1336 Public method to check the WiFi connection status as access point.
1341 </p> 1337 </p>
1338
1342 <dl> 1339 <dl>
1343 <dt>Return:</dt> 1340 <dt>Return:</dt>
1344 <dd> 1341 <dd>
1345 flag indicating the WiFi connection status 1342 flag indicating the WiFi connection status
1346 </dd> 1343 </dd>
1352 </dd> 1349 </dd>
1353 </dl> 1350 </dl>
1354 <a NAME="CircuitPythonDevice.isWifiClientConnected" ID="CircuitPythonDevice.isWifiClientConnected"></a> 1351 <a NAME="CircuitPythonDevice.isWifiClientConnected" ID="CircuitPythonDevice.isWifiClientConnected"></a>
1355 <h4>CircuitPythonDevice.isWifiClientConnected</h4> 1352 <h4>CircuitPythonDevice.isWifiClientConnected</h4>
1356 <b>isWifiClientConnected</b>(<i></i>) 1353 <b>isWifiClientConnected</b>(<i></i>)
1357
1358 <p> 1354 <p>
1359 Public method to check the WiFi connection status as client. 1355 Public method to check the WiFi connection status as client.
1360 </p> 1356 </p>
1357
1361 <dl> 1358 <dl>
1362 <dt>Return:</dt> 1359 <dt>Return:</dt>
1363 <dd> 1360 <dd>
1364 flag indicating the WiFi connection status 1361 flag indicating the WiFi connection status
1365 </dd> 1362 </dd>
1371 </dd> 1368 </dd>
1372 </dl> 1369 </dl>
1373 <a NAME="CircuitPythonDevice.removeCredentials" ID="CircuitPythonDevice.removeCredentials"></a> 1370 <a NAME="CircuitPythonDevice.removeCredentials" ID="CircuitPythonDevice.removeCredentials"></a>
1374 <h4>CircuitPythonDevice.removeCredentials</h4> 1371 <h4>CircuitPythonDevice.removeCredentials</h4>
1375 <b>removeCredentials</b>(<i></i>) 1372 <b>removeCredentials</b>(<i></i>)
1376
1377 <p> 1373 <p>
1378 Public method to remove the saved credentials from the connected device. 1374 Public method to remove the saved credentials from the connected device.
1379 </p> 1375 </p>
1376
1380 <dl> 1377 <dl>
1381 <dt>Return:</dt> 1378 <dt>Return:</dt>
1382 <dd> 1379 <dd>
1383 tuple containing a flag indicating success and an error message 1380 tuple containing a flag indicating success and an error message
1384 </dd> 1381 </dd>
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
1569 </dd> 1566 </dd>
1570 </dl> 1567 </dl>
1571 <a NAME="CircuitPythonDevice.stopAccessPoint" ID="CircuitPythonDevice.stopAccessPoint"></a> 1568 <a NAME="CircuitPythonDevice.stopAccessPoint" ID="CircuitPythonDevice.stopAccessPoint"></a>
1572 <h4>CircuitPythonDevice.stopAccessPoint</h4> 1569 <h4>CircuitPythonDevice.stopAccessPoint</h4>
1573 <b>stopAccessPoint</b>(<i></i>) 1570 <b>stopAccessPoint</b>(<i></i>)
1574
1575 <p> 1571 <p>
1576 Public method to stop the access point interface. 1572 Public method to stop the access point interface.
1577 </p> 1573 </p>
1574
1578 <dl> 1575 <dl>
1579 <dt>Return:</dt> 1576 <dt>Return:</dt>
1580 <dd> 1577 <dd>
1581 tuple containg a flag indicating success and an error message 1578 tuple containg a flag indicating success and an error message
1582 </dd> 1579 </dd>
1588 </dd> 1585 </dd>
1589 </dl> 1586 </dl>
1590 <a NAME="CircuitPythonDevice.supportsLocalFileAccess" ID="CircuitPythonDevice.supportsLocalFileAccess"></a> 1587 <a NAME="CircuitPythonDevice.supportsLocalFileAccess" ID="CircuitPythonDevice.supportsLocalFileAccess"></a>
1591 <h4>CircuitPythonDevice.supportsLocalFileAccess</h4> 1588 <h4>CircuitPythonDevice.supportsLocalFileAccess</h4>
1592 <b>supportsLocalFileAccess</b>(<i></i>) 1589 <b>supportsLocalFileAccess</b>(<i></i>)
1593
1594 <p> 1590 <p>
1595 Public method to indicate file access via a local directory. 1591 Public method to indicate file access via a local directory.
1596 </p> 1592 </p>
1593
1597 <dl> 1594 <dl>
1598 <dt>Return:</dt> 1595 <dt>Return:</dt>
1599 <dd> 1596 <dd>
1600 flag indicating file access via local directory 1597 flag indicating file access via local directory
1601 </dd> 1598 </dd>
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

eric ide

mercurial