Previous week|Assciment list|Next week



use fabmodule.org to generate .rml file and send it to the SRM-20 CNC.
Durning soldering, I found a pin header is not connect to any wire.
In the first try, I fail.

This time, I decide to wrote my own code to test this circuit.




#include<SoftwareSerial.h>
SoftwareSerial mySerial(0, 1);  // RX pin5, TX pin6
void setup() // setup all pins as OUTPUTS to drive current for
{
    mySerial.begin(9600);
    pinMode(A1, INPUT);
}
void loop()
{
    int sensorVal = analogRead(A1);
    
    int scaledValue = map(sensorVal, 0, 1023, 0, 255);
    mySerial.println(sensorVal);
    
    delay(200);
}
What I learn:

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.