Arduino workshop at Local Motors

A couple of weeks ago I attended a workshop on Arduino at Local Motors (LM). There were about 20 people, some with experience; others with none. Some brought their own Arduino kits and LM provided kits for us who did not have. First, there was a presentation on Arduino so that we could understand the basics. Then we started the workshop; our first exercise was to blink a LED. In Arduino terms, you enable one pin as output, then you loop to set the value to 0 and 1. Here’s the code:

// Pin 13 has a LED connected on most Arduino boards.
int led = 13;

// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
}

// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

I installed the Arduino IDE (version 1.6.4) on my laptop (14.04) sudo apt-get install arduino arduino-core so I could interface with the board which just connects to a USB port. LM provided breadboards so we could try various schematics, blink 2 LEDs with variable timing, control motors, etc. The LM people were very helpful. I plan to go to the next workshop, it was fun.

_____
http://www.arduino.cc/
https://localmotors.com/explore/search/arduino/

Arduino Camp at LM Labs Saturday, May 16, 2015 2:00 PM to 6:00 PM

for more info go to

Arduino Camp at LM Labs

Saturday, May 16, 2015, 2:00 PM

Local Motors
1576B South Nelson Drive, Chandler, AZ) Chandler, AZ

52 Makers Went

Heard of Arduino and want to learn about it? Maybe you want to make your appliance smarter ( like make your toaster control lights)? Or maybe make something like an audio synthesizer? Special guest Dan Cervo (author of ‘Pro Arduino’, and regular Arduino instructor) is attending to give an introductory lesson. We will have some Arduinos at hand, but…

Check out this Meetup →

Debian Service

I have found a couple Debian based distributions that have trouble turning off services at start up. To begin, services are background jobs that run on *nix systems. In compression to Windows they are what you can find by opening the task manager and finding the processes. You don’t see the programs running because they are in the back ground. Most of these services are harmless but unnecessary. To stop a service in a Debian system type in the command.

sudo service servicename stop

or

sudo /etc/init.d/servicename stop

This stops the service running while the system is running. Replace the service with the name of the service. The best way to see what the service is called it by typing

cat /etc/services

If you can’t find the service then try

ps aux | grep servicename

Then use

sudo kill -9 PID

to stop the service.

Now the trouble, when trying to stop the script to activate the service at start up it is

sudo update-rc.d -f servicename remove

This command will remove the smybolic links between the startup scripts in the /etc/init.d/servicename

It seems that a couple Debian distributions have changed the way startup scripts work. You wouldn’t want an administrator or anyone that had root or sudo access to turn off a service by mistake or purpose. After searching I found a command that will write an orerride file that the /etc/init.d files will search for before running a service.

echo manual | sudo tee /etc/init/servicename.override

I have tried this command in Ubuntu and Zorin right now and rebooted both and the services I want to stay off have stayed off. If I need to turn them on, I will do it manually then turn them off. This helps ti keep an eye on which services are running and being able to control them.