A Makespace Educator at MG Space, Shenzhen China.
Attending Fab Academy 2018 in Fab Lab szoil
© 2018 Lingyu Yue · Template by Bootstrapious
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Assignments Measure something: add a sensor to a microcontroller board that you have designed and read it. (Individual Project) Measure the analog levels and digital signals in an input device.
Summary of the week I tried to make a Magnetic Field input sensor.I use an ATtiny45 microprocessor.
I tried to make a Magnetic Field input sensor.I use an ATtiny45 microprocessor.
I used Autodesk Eagle 8.7.1 to draw the Schematic and Board Layout.
Create the symbol of A1324
Create the package of A1324
Create the device of A1324
Draw the schematic
Design the eagle board
Arrange the line
Traces
Interior
We have to name the png file and rml file in English, othervise the Milling Machine can't recognise them.
After assembling the PCB,use multimeter to check if all connections are good, don't rush to programm.
#include "SoftwareSerial.h" const int analogInPin = A2; // Analog input pin that the potentiometer is attached to int sensorValue = 0; // value read from the pot int outputValue = 0; // value output to the PWM (analog out) const int Rx = 1; // this is physical pin 7 const int Tx = 2; // this is physical pin 6 SoftwareSerial mySerial(Rx, Tx); void setup() { // pinMode(3, OUTPUT); pinMode(Rx, INPUT); pinMode(Tx, OUTPUT); mySerial.begin(9600); // send serial data at 9600 bits/sec } void loop() { // read the analog in value: sensorValue = analogRead(analogInPin); // map it to the range of the analog out: outputValue = map(sensorValue, 0, 1023, 0, 255); mySerial.println(outputValue); delay(100); }
Here are the files of my Magnetic Field Board.