emfcamp / mk4-apps Goto Github PK
View Code? Open in Web Editor NEWApps to download and run on the Mk4 badge
Apps to download and run on the Mk4 badge
TiLDA Mk4 App Library ------------------- Check out the wiki: https://badge.emfcamp.org/wiki/TiLDA_MK4 Please use one of these categories: * System * Homescreens * Games * Sound * EMF * Villages * Phone * LEDs * Sensors * Demo * Other
For an example, try snake, the X&Y coordinates of the food is always the same, forming a diagonal line.
My badge was working but I couldn't connect to it over serial (Separate issue I think) so I reset it and now when I boot the badge I get a message saying Long Press MENU
so I do (and nothing else does anything).
When I do this the badge resets and then I get a screen saying Select App to start
; if I select home_default then it goes back to Long Press MENU
. If I select launcher then it goes straight back to Select App to start
. If I select any other app then it reboots and takes me to the app but if I try and go to the menu then I get back to Long Press MENU
and I am stuck again!
I'm probably being stupid but any help would be greatly appreciated
๐
There are a lot of apps now. If you clone the repo and do a ./tilda_tools sync
you sync all off the apps, including the ones that have ___bootstrap___ = False
. This is going to take up a lot of space on the flash and will eventually fill it up completely.
This shouldn't happen
After syncing weather a new or an existing app the Mk4 freezes and has to be reset.
Afterwards you can't download any App from the Badge Store.
-> Hangs up after confirming that you want to install the new app.
I could reproduce this bug several times.
On Ubuntu I get the mass storage device to appear and I can change files, but when I eject it the app doesn't close automatically. When I eventually have to reset the badge the storage is corrupted and I need to factory reset.
Also saw some weird things like Sorry, could not display all the contents of โ2821-0000โ: Error when getting information for file '/media/ben/2821-0000/ screen.app': Input/output error
Or for file /media.../ import os
which makes it seem like something pythony is going wrong.
Tried to do a factory Reset as per:
https://badge.emfcamp.org/wiki/TiLDA_MK4/reset
Asked me to select a Wifi Network.
The keypad does not function in reset mode and I am unable to enter my wifi password.
Connect to the REPL then run:
import sleep
sleep.sleep(10) #Expecting the console to hang for 10 seconds before returning
The console returns immediately.
When trying to run various commands (such as sync) this error appears:
C:\Users\moliv\Documents\Mk4-Apps-master\.development>.\tilda_tools.py sync Traceback (most recent call last): File "C:\Users\moliv\Documents\Mk4-Apps-master\.development\tilda_tools.py", line 153, in <module> main() File "C:\Users\moliv\Documents\Mk4-Apps-master\.development\tilda_tools.py", line 97, in main add_metadata(path, resources) File "C:\Users\moliv\Documents\Mk4-Apps-master\.development\resources.py", line 145, in add_metadata resource.update(_normalize_metadata(read_metadata(stream))) File "C:\Users\moliv\Documents\Mk4-Apps-master\.development\metadata_reader.py", line 25, in read_metadata result["doc"] = _read_docstring(s) File "C:\Users\moliv\Documents\Mk4-Apps-master\.development\metadata_reader.py", line 37, in _read_docstring delimiter = _read_non_whitespace(s, 3) File "C:\Users\moliv\Documents\Mk4-Apps-master\.development\metadata_reader.py", line 131, in _read_non_whitespace result = s.read(1) File "C:\Users\moliv\AppData\Local\Programs\Python\Python37-32\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 448: character maps to <undefined>
Like a minimal version that lets you pick the branch/repo. We could potentially add that functionality to the main app store. There's a "/prs" endpoint on the server that returns open PRs, which would be immensely helpful with reviewing.
when selected no PW is asked and this json is written:
{"ssid":"emfcamp-legacy18","user":"internetofstuff","pw":"internetofstuff"}
we can probably copy stuff from the wiki
I've only ever tested it on macos
It's minimally functional at the moment, but it could do with some nicening up (is that even a word?).
I was thinking that a grid of icons would be nice, so I started the icons lib, but I didn't get very far with it.
Hi,
$ sudo ./tilda_tools test
Local Test: PASS
Connected to badge: DONE
Stopping running app:Traceback (most recent call last):
File "./tilda_tools", line 153, in <module>
main()
File "./tilda_tools", line 117, in main
pyboard_util.stop_badge(args, args.verbose)
File "/home/walter/srcelf/Mk4-Apps/.development/pyboard_util.py", line 31, in stop_badge
write_command(pyb, b'\r\x03\x03') # ctrl-C twice: interrupt any running program
File "/home/walter/srcelf/Mk4-Apps/.development/pyboard_util.py", line 40, in write_command
pyb.serial.write(command)
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 552, in write
raise writeTimeoutError
serial.serialutil.SerialTimeoutException: Write timeout
Whatever I do, I get the serialtimeout. Decreasing baud rate to 14400 or lower doesn't help.
I don't have any affinity with COM/USB ports, so this is all black magic to me thusfar.
Any ideas or tips?
I bootstrapped my badge over wifi and then tried to use tilda_tools reset
to put the badge into a known state but this always gave obscure errors:
[jburgess@localhost Mk4-Apps]$ ./tilda_tools reset
Connected to badge: DONE
Stopping running app: DONE
could not exec command (response: b'>>')
[jburgess@localhost Mk4-Apps]$ ./tilda_tools reset
Connected to badge: DONE
Stopping running app: DONE
could not exec command (response: b'",')
[jburgess@localhost Mk4-Apps]$
going to the repl with minicom I got a clue that h
was missing:
Press CTRL-A Z for help on special keys
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'h' is not defined
>>>
After some more digging I see that h()
is defined by copy_via_repl_header.py
and that only gets copied to the badge if you use something like tilda_tools sync
. It would be nice if the reset code had some better error checking or could automatically copy across this file.
I just can't get any of my main.py programs to work, even a simple:
print("Hello World")
Assuming that prints to the serial port.
I'm getting a roughly 10 degree difference (25 vs 35) in temperature readings from the built in sysinfo vs the "warm and wet" app. I don't have a second measurement device to confirm this here, so not sure what to believe, but my office feels like "somewhere in-between" :D
If I try to use the tilda tools with the badge I always receive a "Receiving SerialTimeoutException: Write timeout".
The log output looks like this. I have also tried to specify the device
~/projects/Mk4-Apps$ sudo ./tilda_tools sync hello_world/
Local Test: PASS
Connected to badge: DONE
Stopping running app: DONE
WARN: No resources to copy found for pattern ['hello_world/']
Init copy via repl: Traceback (most recent call last):
File "./tilda_tools", line 151, in <module>
main()
File "./tilda_tools", line 126, in main
synced_resources = sync.sync(args, paths, resources, args.verbose, args.skip_wifi)
File "/home/bb/projects/Mk4-Apps/.development/sync.py", line 34, in sync
pyboard_util.init_copy_via_repl(args)
File "/home/bb/projects/Mk4-Apps/.development/pyboard_util.py", line 167, in init_copy_via_repl
pyb.enter_raw_repl()
File "/home/bb/projects/Mk4-Apps/.development/pyboard.py", line 286, in enter_raw_repl
self.serial.write(b'\r\x03\x03') # ctrl-C twice: interrupt any running program
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 552, in write
raise writeTimeoutError
serial.serialutil.SerialTimeoutException: Write timeout
I am using Linux Mint 18
$ uname -a
Linux bb-ThinkPad-T500 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
lsusb output
us 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 060: ID 1cbe:0007 Luminary Micro Inc.
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 1050:0407 Yubico.com
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
sysinfo consistently stops after a while, without exiting or any other feedback. holding A, B or MENU reboots the device (as intended?) so it's not exactly a show-stopper but looking at the code this is not intended I guess?
I may have a bad neopixel. The Neopixel closest to the end button doesn't work properly:
>>> from machine import Neopix
>>> n=Neopix()
>>> n.display([0xff0000,0xff0000]) # good
>>> n.display([0x00ff00,0x00ff00]) # good
>>> n.display([0x0000ff,0x0000ff]) # bad (very dim red)
>>> n.display([0xaa0000,0xaa0000]) # bad (green)
Appreciate if someone could check.
Will there be a Thursday evening sprint to work through as many issues as possible?
https://badge.emfcamp.org/wiki/TiLDA_MK4
In case you have installed an app that has been removed from badge store in the meantime, you are unable to update the device.
It seems that the update procedure is iterating over all installed apps. If it tries to update the removed app the devices hangs
how to simulate?
Badge Store -> Update all Apps
An app showing all sponsor logos - The latest version of the sponsor logo should either be on HDD or baked into the flash. Pressing any buttons closes it again.
Under ubuntu 16.04 with MATE desktop 1.12.1, I can access the mass storage and write files,
but when I unmount, the badge resets itself to the default file system (without my changes), and the mass storage device throws an I/O error at subsequent attempts to access the mass storage.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.