Search found 847 matches

by OutoftheBOTS_
Wed Apr 18, 2018 7:31 am
Forum: ESP32 boards
Topic: ESP32 uMP cluster
Replies: 3
Views: 2732

ESP32 uMP cluster

This came up on my news feed today. Someone has built a cluster using ESP32 boards and MicroPython https://github.com/Wei1234c/Broccoli/blob/master/notebooks/demo/Broccoli_readme_en.md I am wondering fi this can be used for my Quadraped robot, where each node computes the maths for each leg. With 4 ...
by OutoftheBOTS_
Fri Apr 13, 2018 8:23 pm
Forum: General Discussion and Questions
Topic: Indentation character in a script
Replies: 7
Views: 4593

Re: Indentation character in a script

I use note++ to write all my micropython scripts and only use double space for indentation by pressing space bar twice.
by OutoftheBOTS_
Tue Apr 10, 2018 8:15 am
Forum: General Discussion and Questions
Topic: Timed loop
Replies: 1
Views: 2186

Re: Timed look

If I wanted to run timed loop, say collect data every 60 seconds I do believe that your using Laboris firmware so it has timer callbacks for this see wiki https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/wiki/timer Also, if I use interrupt to capture a button push, then I can't act inside th...
by OutoftheBOTS_
Tue Apr 10, 2018 3:44 am
Forum: ESP8266 boards
Topic: pin change interrupt + debouncing
Replies: 18
Views: 21489

Re: pin change interrupt + debouncing

If you're using ExtInt to detect the pin change, then there is a disable/enable methods available: http://docs.micropython.org/en/latest/p ... nt.disable Is this only available on the pyboard?? I have used the pin.irq in these docs http://docs.micropython.org/en/v1.9.3/esp8266/esp8266/tutorial/pins...
by OutoftheBOTS_
Mon Apr 09, 2018 8:19 pm
Forum: ESP8266 boards
Topic: pin change interrupt + debouncing
Replies: 18
Views: 21489

Re: pin change interrupt + debouncing

@dhylands

Code: Select all

the way I typically do it is that the interrupt handler disables itself and starts a debounce timer.
This is what I have done with Ardunio but I can't find out how to pause an interrupt in Micro-Python.
by OutoftheBOTS_
Mon Apr 09, 2018 10:24 am
Forum: General Discussion and Questions
Topic: Need general guidance on how to run scripts
Replies: 7
Views: 4640

Re: Need general guidance on how to run scripts

I have only been programming in python for a year now so am still learning a lot. Not sure if my answer is 100% correct so if I get anything wrong someone will need to correct me. For me import feels like a cut and paste from the file you have imported from. If you have a file called Logger.py and y...
by OutoftheBOTS_
Mon Apr 09, 2018 10:07 am
Forum: ESP8266 boards
Topic: pin change interrupt + debouncing
Replies: 18
Views: 21489

Re: pin change interrupt + debouncing

@pythoncoder I just looked at your LCD160CR llibiary and this demo of it https://www.youtube.com/watch?v=OOz9U_YdstM

I am impressed.
by OutoftheBOTS_
Sun Apr 08, 2018 9:41 pm
Forum: ESP8266 boards
Topic: pin change interrupt + debouncing
Replies: 18
Views: 21489

Re: pin change interrupt + debouncing

Not sure if somehting like this will do the job. import machine import time pin = machine.Pin(14, machine.Pin.IN, machine.Pin.PULL_UP) value = 0 last_value_change_ms = 0 def callback(p): #not sure if there is a way to pause the call back so it doen't call multi events global value global last_value_...
by OutoftheBOTS_
Sun Apr 08, 2018 2:41 am
Forum: General Discussion and Questions
Topic: How to define ctrl-C handler in MicroPython?
Replies: 5
Views: 6932

Re: How to define ctrl-C handler in MicroPython?

Not sure if there is a way without using try I pretty much use at least try and finally in every single Micro-Python script because on exit (whether it is an error for just script finishing) resources that were allocated during the script need to be released, like SPI , I2C objects or any other obje...
by OutoftheBOTS_
Sun Apr 08, 2018 2:28 am
Forum: General Discussion and Questions
Topic: Need general guidance on how to run scripts
Replies: 7
Views: 4640

Re: Need general guidance on how to run scripts

Automatically on start-up just add to the end of main.py import Logger Manually once I am in serial REPL just type in to the repl import Logger Do beware that you can only import once so if you want to rerun the script for a second time you have to first remove it then import it again. I have added...