How to setup static ip to raspberry pi.

Its easy if your raspberry pi has a static ip when you want to ssh into it, instead of it getting a dynamic one each time it boots up and joins your wifi network.

Edit /etc/dhcpcd.conf

Add following (if 192.168.1.1 is the router address & 19.168.1.101 is static ip you want to assign to raspi)-

interface wlan0

static ip_address=192.168.1.101/24

static router=192.168.1.1

static domain_name_server=192.168.1.1

Raspberry Pi w/ Buzzer

Rpi buzzer

Simple Breadboard setup –

a) Place a passive buzzer anywhere on breadboard with both buzzer pins in same column (e above), mark the side with (+) sign.

b) Take a wire and hook one side of wire to same row as + buzzer pin, hook the other side of wire to GPIO 22 (its 8th pin from top)

c) Take another wire and hook one side of wire to same row as other buzzer pin, hook the other side of wire to any GND pin (3rd pin from top in above setup)

 

Code Setup –

pi@vinu-ras1:~/raspython $ touch simplebuzz.py

pi@vinu-ras1:~/raspython $ nano simplebuzz.py
 #!/usr/bin/python

import os
from time import sleep
import RPi.GPIO as GPIO

GPIO.setmode(GPIO.BCM)
GPIO.setup(22,GPIO.OUT)

loop_count = 0

# define a function
 def buzz ():
         pitch = float(8000)
         duration = 1
         period = 1.0/pitch
         delay = period/2
         cycles=int(duration*pitch)
         for i in range(cycles):
                GPIO.output(22,True)
                sleep(delay)
                GPIO.output(22,False)
                sleep(delay)
         GPIO.cleanup()

os.system('clear')
print "Begin"

buzz()

Run python script to get buzzed…

pi@vinu-ras1:~/raspython $ python simplebuzz.py

Connect UNO R3 with Mac OS Yosemite

Follow should help with following –

a) Connect you new UNO R3 based Arduino board with you Mac OS based system

b) Fix if your UNO R3 based board is not being recognized by your MAC OS.

c) Your UNO R3 board GND led is flashing continuously with any uploaded code.

d) Your Mac OS serial port is not recognized on Mac OS yosemite.

e) Definite guide if you are using ELEGOO UNO R3 with Mac OS yosemite.


Open terminal & run –

/usr/sbin/kextstat | grep FTDI

If it does not show anything, it means that the Mac USB port isn’t talking to your Arduino/UNO R3 board.

The definitive solution found was following –

Download CH341SER_MAC-1.4.zip from somewhere (e.g. below link), unzip and install it (by double clicking on the pkg file) , reboot the system.

Now you should see something like below,

If yes, you should be good to start with your ardunio/UNO R3 projects.

Reference :-

Signed Mac OS Driver for Winchiphead CH340 serial bridge

http://blog.sengotta.net/wp-content/uploads/2015/11/CH341SER_MAC-1.4.zip