tessel / t1-docs Goto Github PK
View Code? Open in Web Editor NEWAPI documentation for Tessel 1. Start reading below. (Unmaintained)
API documentation for Tessel 1. Start reading below. (Unmaintained)
I'd love it if all the t1 documentation lived here, including module documentation. I have an audio module for which there is apparently no documentation, because the t2 doesn't have the audio module?
Buttons, LEDs, configurable options with GPIO, etc.
Tessel REPL exists; there should be docs for it.
trace:
avery@applejack ~/Desktop/tessel/led_proj $ sudo tessel push led_cmdr.js -l
TESSEL! Connected to TM-00-02-f0009a30-00574742-646c45c2.
WARN Error: No package.json or node_modules found, pushing just this file.
Bundling directory /home/avery/Desktop/tessel/led_proj (~137 bytes)
Deploying bundle (4.50 KB)...
Running script...
/app/led_cmdr.js:14: attempt to call method 'on' (a nil value)
stack traceback:
/app/led_cmdr.js:14: in function 'res'
[T]: src/colony/lua/colony-node.lua:14: in function 'run'
[T]: src/colony/lua/colony-node.lua:14: in function 'require'
/_start.js:14: in function 'res'
[T]: src/colony/lua/colony-node.lua:14: in function 'run'
[T]: src/colony/lua/cli.lua:14: in main chunk
[C]: in function 'require'
[T]: runtime:1: in main chunk
However, for SPI, the SPI.on function works fine.
See the RFID tessel.io/docs page
Hello.
Viewing the compatibility document, I didn't see the version of Node you're targeting for parity.
Including this would be helpful when selecting appropriate Node modules for use on the Tessel. It would also be helpful for community members looking to contribute to the Tessel runtime.
My hunch would be v0.10.28, but I'm sure this will change over time and be tied to new firmware releases moving forward.
Cheers!
On Chrome & Safari at least, I see the following text at the very bottom (may need to scroll to end of page) of the left sidebar on pages like: https://tessel.io/docs/home:
isMobile()) : ?>
But it's a little odd as the source in question contains:
<!-- Google Plus -->
<?php $detect = new Mobile_Detect(); if (!$detect->isMobile()) : ?>
<img style="display: none;" onLoad="google_plus_user(true)" alt="" src="https://plus.google.com/up/?continue=https://www.google.com/intl/en/images/logos/accounts_logo.png&type=st&gpsrc=ogpy0" />
<?php endif; ?>
But when viewed via Inspect Element it shows as:
<!--?php $detect = new Mobile_Detect(); if (!$detect--->
i.e. the ->
seems to get converted to --->
.
So, whatever the cause, presumably this section isn't working as intended.
The following sentence on https://tessel.io/docs/home doesn't actually have links to the referred pages:
For details on Tessel and Tessel's modules, including API and hardware design information, explore the links here.
Navigation on tessel.io/docs needs a redesign so that things are easier to find (especially as we add more documentation)
How do I listen to the button callback event?
The documentation lists methods like pin.input()
without distinguishing that they only exist in digital pin objects and not analog pin objects.
For example, the following script
var tessel = require('tessel');
var gpio = tessel.port['GPIO'];
var pin = gpio.pin['A1'];
pin.input();
produces this error
/app/index.js:7: attempt to call method 'input' (a nil value)
Whereas
var tessel = require('tessel');
var gpio = tessel.port['GPIO'];
var pin = gpio.pin['G1'];
pin.input();
works as expected.
Quick check to see the differences in methods:
var tessel = require('tessel');
var gpio = tessel.port['GPIO'];
var pin1 = gpio.pin['G1'];
var pin2 = gpio.pin['A1'];
var getAllMethods = function(object) {
return Object.getOwnPropertyNames(object).filter(function(property) {
return typeof object[property] == 'function';
});
}
console.log("Digital pin:", getAllMethods(pin1));
console.log("Analog pin:", getAllMethods(pin2));
Digital pin: [ input, rawWrite, readSync, read, pull, output, rawRead, high, once, writeSync, set, toggle, removeListener, pulse, removeAllListeners, mode, setOutput, rawDirection, low, write, pulseIn, readPulse, on, setInput, addListener, setMaxListeners, removeListener, removeAllListeners, on, once, listeners, emit ]
Analog pin: [ write, read, readSync ]
E.g. CLI docs for Tessel 2 are currently on the t2-cli repo. This seems appropriate, but there should be some obvious way to get to them from the Docs repo.
What else does this apply to? Modules, runtime, etc.
Needs examples, clearer organization and language
In the example:
var tessel = require('tessel'); // import tessel
var gpio = tessel.port['GPIO']; // select the GPIO port
var myPin = gpio.pwm[0]; // can be gpio.pwm[0] through 3 or gpio.pin['G4'] through โG6โ
// Tell the GPIO port that the frequency of its pwm pins is 980 Hz
gpio.portFrequency(980);
/////////////this is wrong >> should be pwmFrequency////////////////
// Set duty cycle
myPin.pwmDutyCycle(0.6); // set the pin to be on 60% of the time
Should have:
It's possible & cool, would be nice to document how to do this.
We have an outdated doc called wifi.md in this repo (but not on the docs page), and we also talk about wifi in the hardware API doc, which is a bit weird. We should update wifi.md, link it properly into docs, and remove the wifi section from hardwareAPI.md.
How can/should/can't/shouldn't Tessel 2 be powered?
Add code of conduct badge, a la tessel/project#190
We have a virtualbox for development, discussed a bit here but it would be better to have a readme walking people through setting up virtual development & explaining what is & isn't possible
Make a table somewhere of all of the ways you can refer to each pin: 'A3', analog[3], the number the pin knows itself as (23 or something)
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.