Skip to content
This repository has been archived by the owner on Nov 10, 2024. It is now read-only.

Commit

Permalink
NetworkSubsystem
Browse files Browse the repository at this point in the history
  • Loading branch information
MorphaxTheDeveloper committed Mar 13, 2024
1 parent 4865e59 commit e331c16
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions src/main/java/frc/robot/subsystems/NetworkSubsystem.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

package frc.robot.subsystems;

import edu.wpi.first.wpilibj2.command.SubsystemBase;
import edu.wpi.first.networktables.NetworkTable;
import edu.wpi.first.networktables.NetworkTableEntry;
import edu.wpi.first.networktables.NetworkTableInstance;

public class NetworkSubsystem extends SubsystemBase {

String getstr;

public NetworkTableInstance inst = NetworkTableInstance.create();
//table
public NetworkTable table = inst.getTable("table");

//subtable
public NetworkTable networkTable = table.getSubTable("Subtable");

//entry
public NetworkTableEntry veri = networkTable.getEntry("veri");

public NetworkSubsystem() {
inst.startClient4("10.0.0.0");
}

public String return_value(){
return getstr;
}

@Override
public void periodic() {
getstr = veri.getString("0.0");
System.out.println(getstr);
}


}

0 comments on commit e331c16

Please sign in to comment.