Week 1Week 1::Principles and Practices, Project management

- Assignment: build a personal site in the class archive describing you and your final project


Notepad++
Fig1. - Notepad++ : Editing index.html.

To create the website I started from a design created by "TEMPLATED" (http://templated.co/megacorp). Released for free under the Creative Commons Attribution 3.0 license. I used for editing and adaptation of web Notepad ++ program. For the creation and / or modification of the images I used Adobe Photoshop CS5. I preferred to make minimal use of JavaScript (just enough to make it responsive) or fonts "uncommon" to optimize the overall size and compatibility of the web. There are three CSS files that define the style adapted to the access device of the website. It can be seen correctly in smartphones, tablets or PCs. As to the browser compatibility, it is displayed correctly in Firefox, Chrome, I. Explorer and Safari.

A. Photoshop
Fig2. - Adobe Photoshop : Creating icons for weeks assignments.

And ... the final project

Notepad++
Fig3. - First sketch.

This baby crib integrates video surveillance and entertainment for the baby. Through an integrated web server Raspberry Pi we can gain control of the carousel and make it move, sound or lights, we can also watch our baby through the webcam. A sound sensor triggers an alarm to smartphone to warn us that the baby is crying (or laughing). There is the possibility of access from the Internet to the application that manages these elements, but needed extra configuration on the router.

You can add more functionality, such as control humidity or temperature, custom tunes, accounting sleep baby and many more we can imagine. This sketch is of low quality, but this week I do not have the necessary to create a more precise design tools.

Materials I need (for now):

  • Create a handler for the carousel.
  • Raspberry Pi.
  • PiCam.
  • Figures printed in 3D for the carousel.
  • Microphone.
  • LEDs in various colors.
  • Support carousel. (CNC + 3D Printer)
  • Wood 17mm / 19mm for baby cot (CNC).
  • Program a Web application.
  • Small speakers.
  • ... And more.

Mercurial

To start here you must to have copied the keys into the .ssh/academy folder (academy and academy.pub)
Now, you create a folder in your computer where you will save all the FabAcademy archives. E.g. mine is called FabAcademy2015 (Here I´ve got here my eu folder)
First time you clone with the command: (Note: you have to navigate via terminal to the FabAcademy2015/eu Folder)
Via terminal:

hg clone -v ssh://hg@fabacademy-local/academy.2015/Web/eu eu

you are creating this folder

screenshot
Screenshot

Then you have to navigate to that folder (eu) via “terminal”
In terminal:

nano .hg/hgrc
[paths]
default = ssh://hg@fabacademy-local/academy.2015/Web/eu
[ui]
username = Carlos Cano <cetaron@gmail.com>
ssh = ssh -p 846 -i ~/.ssh/keys/academy -C
[hooks]
changegroup = hg update >&2


Once you have the fresh copy in your computer you have to repeat a “mantra” to upload your changes to the repository.
Here starts my dummies-process (I do that every week during the FabAcademy)

  • I save the changes in my repository
    • ( FabAcademy2015/eu/students/cano_rangel.juan_carlos)
  • Navigate (via terminal) to the eu folder
  • I always check the status of the mercurial with: hg status
    • Here we have different options:
      • Something with ? before the name of your file
      • Something with ! before the name of your file
      • Something with A before the name of your file
      • Something with M before the name of your file
      • Something with R before the name of your file
    • You have to get only A, M or R letters before, and don´t have any ? and any !
    • If you have a ? this means that Mercurial have detected any change: You must type: hg add
    • If yoy have a ! this means that Mercurial have detected that you have deleted an archive and you have to tell that it is OK. You must type: hg remove thecompleterouteandnameofthearchive
    • After doing that, I check again : hg status
      • And here we have only A, M and R letters before the files
  • Well, next, I usually check if there is any change in the repository:
    • hg incoming
    • hg pull (you download the last version)
  • Here Mercurial will tell you something like: hg update
    • hg update
  • I always check here the state of the archive:
    • hg heads (If you have only a head, that’s ok, if there are 2 or more, you will have to merge them (hg merge if necessary)
  • We will confirm the changes:
    • hg commit -m “Yourmessage”
  • Now, if we check the heads:
    • hg heads (your only head must appear, and note you have the tip)
  • Then I test “which thing” I’m going to upload:
    • hg outgoing

    Screenshot I

    Screenshot I

    Screenshot II

    Screenshot II

    Screenshot III

    Screenshot III

    Screenshot VI

    Screenshot VI

  • And here, if my head (and my tip) appears here I finish with:
    • hg push
    • I’m crossing my fingers till my computer says something like:

MacBook-Pro-de-TMA-2:eu tma$ hg status
M students/cano_rangel.juan_carlos/index.html
M students/cano_rangel.juan_carlos/week16.html
? students/cano_rangel.juan_carlos/files/week16/086-005a.py
? students/cano_rangel.juan_carlos/files/week16/086-005a.pyc
? students/cano_rangel.juan_carlos/files/week16/leonidas.py
? students/cano_rangel.juan_carlos/files/week16/leonidas.zip
? students/cano_rangel.juan_carlos/images/final.jpg
? students/cano_rangel.juan_carlos/images/week18/all.jpg
? students/cano_rangel.juan_carlos/images/week18/cnc1.jpg
? students/cano_rangel.juan_carlos/images/week18/cnc2.jpg
? students/cano_rangel.juan_carlos/images/week18/completo.jpg
? students/cano_rangel.juan_carlos/images/week18/crux.jpg
? students/cano_rangel.juan_carlos/images/week18/drill.jpg
? students/cano_rangel.juan_carlos/images/week18/driverbrd.jpg
? students/cano_rangel.juan_carlos/images/week18/eje.jpg
? students/cano_rangel.juan_carlos/images/week18/eje2.jpg
? students/cano_rangel.juan_carlos/images/week18/eskema2.jpg
? students/cano_rangel.juan_carlos/images/week18/imagewriter.jpg
? students/cano_rangel.juan_carlos/images/week18/laser1.jpg
? students/cano_rangel.juan_carlos/images/week18/laser2.jpg
? students/cano_rangel.juan_carlos/images/week18/motordriver.jpg
? students/cano_rangel.juan_carlos/images/week18/paint.jpg
? students/cano_rangel.juan_carlos/images/week18/schema.jpg
? students/cano_rangel.juan_carlos/images/week18/tapones.jpg
? students/cano_rangel.juan_carlos/images/week18/tapones2.jpg
? students/cano_rangel.juan_carlos/week18.html
MacBook-Pro-de-TMA-2:eu tma$ hg add
adding students/cano_rangel.juan_carlos/files/week16/086-005a.py
adding students/cano_rangel.juan_carlos/files/week16/086-005a.pyc
adding students/cano_rangel.juan_carlos/files/week16/leonidas.py
adding students/cano_rangel.juan_carlos/files/week16/leonidas.zip
adding students/cano_rangel.juan_carlos/images/final.jpg
adding students/cano_rangel.juan_carlos/images/week18/all.jpg
adding students/cano_rangel.juan_carlos/images/week18/cnc1.jpg
adding students/cano_rangel.juan_carlos/images/week18/cnc2.jpg
adding students/cano_rangel.juan_carlos/images/week18/completo.jpg
adding students/cano_rangel.juan_carlos/images/week18/crux.jpg
adding students/cano_rangel.juan_carlos/images/week18/drill.jpg
adding students/cano_rangel.juan_carlos/images/week18/driverbrd.jpg
adding students/cano_rangel.juan_carlos/images/week18/eje.jpg
adding students/cano_rangel.juan_carlos/images/week18/eje2.jpg
adding students/cano_rangel.juan_carlos/images/week18/eskema2.jpg
adding students/cano_rangel.juan_carlos/images/week18/imagewriter.jpg
adding students/cano_rangel.juan_carlos/images/week18/laser1.jpg
adding students/cano_rangel.juan_carlos/images/week18/laser2.jpg
adding students/cano_rangel.juan_carlos/images/week18/motordriver.jpg
adding students/cano_rangel.juan_carlos/images/week18/paint.jpg
adding students/cano_rangel.juan_carlos/images/week18/schema.jpg
adding students/cano_rangel.juan_carlos/images/week18/tapones.jpg
adding students/cano_rangel.juan_carlos/images/week18/tapones2.jpg
adding students/cano_rangel.juan_carlos/week18.html
MacBook-Pro-de-TMA-2:eu tma$ hg status
M students/cano_rangel.juan_carlos/index.html
M students/cano_rangel.juan_carlos/week16.html
A students/cano_rangel.juan_carlos/files/week16/086-005a.py
A students/cano_rangel.juan_carlos/files/week16/086-005a.pyc
A students/cano_rangel.juan_carlos/files/week16/leonidas.py
A students/cano_rangel.juan_carlos/files/week16/leonidas.zip
A students/cano_rangel.juan_carlos/images/final.jpg
A students/cano_rangel.juan_carlos/images/week18/all.jpg
A students/cano_rangel.juan_carlos/images/week18/cnc1.jpg
A students/cano_rangel.juan_carlos/images/week18/cnc2.jpg
A students/cano_rangel.juan_carlos/images/week18/completo.jpg
A students/cano_rangel.juan_carlos/images/week18/crux.jpg
A students/cano_rangel.juan_carlos/images/week18/drill.jpg
A students/cano_rangel.juan_carlos/images/week18/driverbrd.jpg
A students/cano_rangel.juan_carlos/images/week18/eje.jpg
A students/cano_rangel.juan_carlos/images/week18/eje2.jpg
A students/cano_rangel.juan_carlos/images/week18/eskema2.jpg
A students/cano_rangel.juan_carlos/images/week18/imagewriter.jpg
A students/cano_rangel.juan_carlos/images/week18/laser1.jpg
A students/cano_rangel.juan_carlos/images/week18/laser2.jpg
A students/cano_rangel.juan_carlos/images/week18/motordriver.jpg
A students/cano_rangel.juan_carlos/images/week18/paint.jpg
A students/cano_rangel.juan_carlos/images/week18/schema.jpg
A students/cano_rangel.juan_carlos/images/week18/tapones.jpg
A students/cano_rangel.juan_carlos/images/week18/tapones2.jpg
A students/cano_rangel.juan_carlos/week18.html
MacBook-Pro-de-TMA-2:eu tma$ hg incoming
comparing with ssh://hg@fabacademy-local/academy.2015/Web/eu
searching for changes
no changes found
MacBook-Pro-de-TMA-2:eu tma$ hg commit -m 'Final Push'
MacBook-Pro-de-TMA-2:eu tma$ hg heads
changeset: 2209:5e9018048de6
tag: tip
user: Juan Carlos Cano <cetaron@gmail.com>
date: Tue Jun 30 17:31:31 2015 +0200
summary: Final Push

MacBook-Pro-de-TMA-2:eu tma$ hg outgoing
comparing with ssh://hg@fabacademy-local/academy.2015/Web/eu
searching for changes
changeset: 2209:5e9018048de6
tag: tip
user: Juan Carlos Cano <cetaron@gmail.com>
date: Tue Jun 30 17:31:31 2015 +0200
summary: Final Push

MacBook-Pro-de-TMA-2:eu tma$ hg push
pushing to ssh://hg@fabacademy-local/academy.2015/Web/eu
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 26 changes to 26 files
remote: 26 files updated, 0 files merged, 0 files removed, 0 files unresolved
MacBook-Pro-de-TMA-2:eu tma$ hg heads
changeset: 2209:5e9018048de6
tag: tip
user: Juan Carlos Cano <cetaron@gmail.com>
date: Tue Jun 30 17:31:31 2015 +0200
summary: Final Push

MacBook-Pro-de-TMA-2:eu tma$

If not, you NEVER NEVER NEVER force Mercurial to push (repeat all the process from pull, inclusive)