Print failure remains a major challenge in fused deposition modeling (FDM) 3D printing because it may lead to material waste, production delays, and potential damage to printer components. One frequent failure mode is the spaghetti defect , in which extruded filament forms irregular strands due to poor bed adhesion, object displacement, or extrusion outside the intended printing path. This study develops a low-cost visual inspection system based on a web-camera and Raspberry Pi for real-time detection of spaghetti defect using a YOLO object detection model. The proposed system captures visual data from the printing area, processes image frames locally on the edge device, and displays the detected defect location using a bounding box, class label, and confidence score. The dataset consisted of 100 images, including 50 normal printing images and 50 spaghetti defect images, divided into training, validation, and testing sets using a 70:20:10 ratio. Defect images were annotated using bounding boxes to enable location-based defect detection. The evaluation results show that the model achieved a precision of 91.30%, recall of 88.24%, F1-score of 89.74%, mAP@0.5 of 92.10%, and mAP@0.5:0.95 of 87.30%. Real-time testing also demonstrated that the system could detect spaghetti defect with confidence scores ranging from 0.87 to 0.90. These results indicate that the integration of a web-camera, Raspberry Pi, and YOLO has potential as an economical and portable early monitoring system for FDM 3D printing failures.