Follow the Getting Started tutorial. We’ll go over this together.
Import an external model into your project:
Save the file from here into a file called OBJMTLLoader.js
, within your three.js folder.
Include this code to import an OBJ with materials:
var objMtlLoader = new THREE.OBJMTLLoader(); // create the OBJ loader
objMtlLoader.load("filename.obj", "filename.mtl", function(object, url) { // load the OBJ and companion MTL
scene.add(object); // add it to the scene
});
]]>brew cask install etcher
Download and install Etcher: https://etcher.io/
ifconfig
wlan0
section and find and write down the HWaddr
; it should look something like: b8:27:eb:00:00:00
Select the “Legacy Wireless Network” and click the in-line “Continue” button.
Enter a name for your Raspberry Pi
Enter the wlan0
MAC address from the raspberry pi
Now we wait…
Open Terminal and type
sudo reboot
crontab
The command
sudo crontab -e
will take you to the root crontab, meaning your tasks will run regardless of which user is logged in
You can also use special signifiers
A common example is to start a program a few seconds after startup:
@reboot sleep 10 && /usr/bin/nodejs /path/to/nodescript.js
startx
We are going to test to see if our connection has propagated by running the command
ping google.com
If it returns with a list similar to this:
PING google.com (68.65.124.44): 56 data bytes
64 bytes from 68.65.124.44: icmp_seq=0 ttl=60 time=12.702 ms
64 bytes from 68.65.124.44: icmp_seq=1 ttl=60 time=13.478 ms
64 bytes from 68.65.124.44: icmp_seq=2 ttl=60 time=13.880 ms
64 bytes from 68.65.124.44: icmp_seq=3 ttl=60 time=12.818 ms
then you are connected. If not, keep waiting.
ssh $USER@$URL
for example ssh pi@hostname.wv.cc.cmu.edu
It will ask if you want to add this to the list of known hosts, type Yes
Linux has a built-in package manager called apt-get
We need to update the list of package repositories:
sudo apt-get update
Next, we want to get the newest versions of all our packages:
sudo apt-get upgrade
(this may take a while and require some user confirmation)
Raspbian comes with Node.js installed, but the version is very old.
We need to add a new repository to our package manager:
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
Now, install Node.js:
sudo apt-get install nodejs
Install Samba with:
sudo apt-get install samba
Go to the Samba configuration folder:
cd /etc/samba/
Rename the configuration file (so we have a backup):
sudo mv smb.conf smb.conf.original
Make and edit a new one:
sudo nano smb.conf
[global]
workgroup = WORKGROUP
netbios name = SAMBA
server string = Samba Server %v
map to guest = Bad User
log file = /var/log/samba/log.%m
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=819SO_SNDBUF=8192
preferred master = No
local master = No
dns proxy = No
security = User
# Share
[Data]
path = /
valid users = pi
read only = No
create ma19 = 0755
directory mask = 0755
Set up a new password:
sudo smbpasswd -a pi
Restart the Samba service:
sudo service smbd restart
⌘+k
git clone https://github.com/Making-Things-Interactive/button-twitter.git
JavaScript Object Notation is a data format used extensively on the web. It was developed for easy parsing within JavaScipt.
JSON is written in key|value pairs "first_name" : "John"
{
"employees" : [ "John", "Cody", "Olivia"]
}
{
"employee" : {
"name" : "John",
"age" : 82,
"city" : "Canada"
}
}
{
"name" : "Stephano",
"age" : 34,
"friends" : ["Susan", "Eric", "Katie"],
"datetime" : "20170215T123719"
}
{
created_at: 'Wed Feb 08 21:37:22 +0000 2017',
id: 829444033101586400,
id_str: '829444033101586440',
text: 'In a Rare Zoo Escape, Sunny the Red Panda Is Still at Large https://t.co/mhOT4z8NIu https://t.co/8vHtTlqbmQ',
display_text_range: [ 0, 83 ],
source: '<a href="http://publicize.wp.com/" rel="nofollow">WordPress.com</a>',
user: {
id: 972385555,
id_str: '972385555',
name: 'Walkileaks',
screen_name: 'walkileaks',
location: 'United States',
url: 'http://www.walkileaks.com',
protected: false,
utc_offset: -28800,
is_translator: false,
notifications: null
},
geo: null,
coordinates: null,
place: null,
contributors: null,
is_quote_status: false,
retweet_count: 0,
favorite_count: 0,
entities: {
hashtags: [],
urls: [ [Object] ],
user_mentions: [],
symbols: [],
media: [ [Object] ]
},
extended_entities: { media: [ [Object] ] },
timestamp_ms: '1486589842473'
}
]]>I can never remember which side of an acrylic sheet I’m supposed to peel the paper from to get the best quality cut. This article from Ponoko recommends leaving the paper on the bottom of the sheet (to reduce damage from flareups in the bed), and to remove the paper from the top UNLESS you’re doing heavy/a lot of engraving on the sheet.
]]>